Update PasienService
Pembuatan API simpan pasien baru bpjs dari mobile jkn
This commit is contained in:
parent
f75d0a64ab
commit
77b1eec23b
@ -11,10 +11,15 @@ import java.util.List;
|
|||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
|
import javax.validation.Valid;
|
||||||
|
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.http.HttpStatus;
|
import org.springframework.http.HttpStatus;
|
||||||
import org.springframework.http.MediaType;
|
import org.springframework.http.MediaType;
|
||||||
import org.springframework.http.ResponseEntity;
|
import org.springframework.http.ResponseEntity;
|
||||||
|
import org.springframework.orm.jpa.JpaSystemException;
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestMethod;
|
import org.springframework.web.bind.annotation.RequestMethod;
|
||||||
@ -38,6 +43,7 @@ import com.jasamedika.medifirst2000.entities.Pegawai;
|
|||||||
import com.jasamedika.medifirst2000.entities.Pendidikan;
|
import com.jasamedika.medifirst2000.entities.Pendidikan;
|
||||||
import com.jasamedika.medifirst2000.entities.Ruangan;
|
import com.jasamedika.medifirst2000.entities.Ruangan;
|
||||||
import com.jasamedika.medifirst2000.enums.TipePasienEnum;
|
import com.jasamedika.medifirst2000.enums.TipePasienEnum;
|
||||||
|
import com.jasamedika.medifirst2000.exception.ServiceVOException;
|
||||||
import com.jasamedika.medifirst2000.service.JadwalDokterService;
|
import com.jasamedika.medifirst2000.service.JadwalDokterService;
|
||||||
import com.jasamedika.medifirst2000.service.ModelService;
|
import com.jasamedika.medifirst2000.service.ModelService;
|
||||||
import com.jasamedika.medifirst2000.service.PasienService;
|
import com.jasamedika.medifirst2000.service.PasienService;
|
||||||
@ -72,6 +78,8 @@ import com.jasamedika.medifirst2000.vo.custom.BridgeDaftarVerifikasiPasienNotFou
|
|||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/daftar-ol")
|
@RequestMapping("/daftar-ol")
|
||||||
public class BridgingDaftarOnlineController {
|
public class BridgingDaftarOnlineController {
|
||||||
|
private static final Logger LOGGER = LoggerFactory.getLogger(BridgingDaftarOnlineController.class);
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private PasienService<Pasien> pasienService;
|
private PasienService<Pasien> pasienService;
|
||||||
|
|
||||||
@ -83,7 +91,7 @@ public class BridgingDaftarOnlineController {
|
|||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private RuanganService<RuanganVO> ruanganService;
|
private RuanganService<RuanganVO> ruanganService;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private PegawaiService pegawaiService;
|
private PegawaiService pegawaiService;
|
||||||
|
|
||||||
@ -646,10 +654,26 @@ public class BridgingDaftarOnlineController {
|
|||||||
List<Map<String, Object>> entity = ruanganService.findRajalBPJS();
|
List<Map<String, Object>> entity = ruanganService.findRajalBPJS();
|
||||||
return new ResponseEntity<>(entity, HttpStatus.OK);
|
return new ResponseEntity<>(entity, HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
@RequestMapping(value = "/bpjs/dpjp/list", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)
|
@RequestMapping(value = "/bpjs/dpjp/list", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)
|
||||||
public ResponseEntity<Object> getListDpjp() {
|
public ResponseEntity<Object> getListDpjp() {
|
||||||
List<Map<String, Object>> entity = pegawaiService.getDokterBpjs();
|
List<Map<String, Object>> entity = pegawaiService.getDokterBpjs();
|
||||||
return new ResponseEntity<>(entity, HttpStatus.OK);
|
return new ResponseEntity<>(entity, HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@RequestMapping(value = "/bpjs/patient/save", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE)
|
||||||
|
public ResponseEntity<Object> saveNewPatient(@Valid @RequestBody PasienVO vo) {
|
||||||
|
try {
|
||||||
|
PasienVO result = pasienService.add(vo);
|
||||||
|
if (null != result)
|
||||||
|
return new ResponseEntity<>(true, HttpStatus.CREATED);
|
||||||
|
} catch (ServiceVOException e) {
|
||||||
|
LOGGER.error("Got exception {} when add Pasien", e.getMessage());
|
||||||
|
return new ResponseEntity<>(false, HttpStatus.INTERNAL_SERVER_ERROR);
|
||||||
|
} catch (JpaSystemException jse) {
|
||||||
|
LOGGER.error("Got exception {} when add Pasien", jse.getMessage());
|
||||||
|
return new ResponseEntity<>(false, HttpStatus.CONFLICT);
|
||||||
|
}
|
||||||
|
return new ResponseEntity<>(false, HttpStatus.NOT_ACCEPTABLE);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -166,34 +166,39 @@ public class PasienServiceImpl extends BaseVoServiceImpl implements PasienServic
|
|||||||
public PasienVO add(PasienVO vo) throws JpaSystemException, ServiceVOException {
|
public PasienVO add(PasienVO vo) throws JpaSystemException, ServiceVOException {
|
||||||
Pasien pasien = new Pasien();
|
Pasien pasien = new Pasien();
|
||||||
pasien = pasienConverter.transferVOToModel(vo, pasien);
|
pasien = pasienConverter.transferVOToModel(vo, pasien);
|
||||||
pasien.setJenisKelamin(jenisKelaminConverter.transferVOToModel(vo.getJenisKelamin(), new JenisKelamin()));
|
if (CommonUtil.isNotNullOrEmpty(vo.getJenisKelamin()))
|
||||||
pasien.setAgama(agamaConverter.transferVOToModel(vo.getAgama(), new Agama()));
|
pasien.setJenisKelamin(jenisKelaminConverter.transferVOToModel(vo.getJenisKelamin(), new JenisKelamin()));
|
||||||
pasien.setPendidikan(pendidikanConverter.transferVOToModel(vo.getPendidikan(), new Pendidikan()));
|
if (CommonUtil.isNotNullOrEmpty(vo.getAgama()))
|
||||||
pasien.setPekerjaan(pekerjaanConverter.transferVOToModel(vo.getPekerjaan(), new Pekerjaan()));
|
pasien.setAgama(agamaConverter.transferVOToModel(vo.getAgama(), new Agama()));
|
||||||
pasien.setStatusPerkawinan(
|
if (CommonUtil.isNotNullOrEmpty(vo.getPendidikan()))
|
||||||
statusPerkawinanConverter.transferVOToModel(vo.getStatusPerkawinan(), new StatusPerkawinan()));
|
pasien.setPendidikan(pendidikanConverter.transferVOToModel(vo.getPendidikan(), new Pendidikan()));
|
||||||
|
if (CommonUtil.isNotNullOrEmpty(vo.getPekerjaan()))
|
||||||
|
pasien.setPekerjaan(pekerjaanConverter.transferVOToModel(vo.getPekerjaan(), new Pekerjaan()));
|
||||||
|
if (CommonUtil.isNotNullOrEmpty(vo.getStatusPerkawinan()))
|
||||||
|
pasien.setStatusPerkawinan(
|
||||||
|
statusPerkawinanConverter.transferVOToModel(vo.getStatusPerkawinan(), new StatusPerkawinan()));
|
||||||
List<Alamat> listAlamat = new ArrayList<Alamat>();
|
List<Alamat> listAlamat = new ArrayList<Alamat>();
|
||||||
for (AlamatVO alamatVo : vo.getAlamats()) {
|
for (AlamatVO alamatVo : vo.getAlamats()) {
|
||||||
Alamat alamat = new Alamat();
|
Alamat alamat = new Alamat();
|
||||||
alamat = alamatConverter.transferVOToModel(alamatVo, new Alamat());
|
alamat = alamatConverter.transferVOToModel(alamatVo, new Alamat());
|
||||||
alamat.setJenisAlamat(jenisAlamatConverter.transferVOToModel(alamatVo.getJenisAlamat(), new JenisAlamat()));
|
if (CommonUtil.isNotNullOrEmpty(alamatVo.getJenisAlamat()))
|
||||||
alamat.setPropinsi(propinsiConverter.transferVOToModel(alamatVo.getPropinsi(), new Propinsi()));
|
alamat.setJenisAlamat(jenisAlamatConverter.transferVOToModel(alamatVo.getJenisAlamat(), new JenisAlamat()));
|
||||||
alamat.setNegara(negaraConverter.transferVOToModel(alamatVo.getNegara(), new Negara()));
|
if (CommonUtil.isNotNullOrEmpty(alamatVo.getPropinsi()))
|
||||||
alamat.setRekanan(rekananConverter.transferVOToModel(alamatVo.getRekanan(), new Rekanan()));
|
alamat.setPropinsi(propinsiConverter.transferVOToModel(alamatVo.getPropinsi(), new Propinsi()));
|
||||||
alamat.setPegawai(loginUserConverter.transferVOToModel(alamatVo.getPegawai(), new LoginUser()));
|
if (CommonUtil.isNotNullOrEmpty(alamatVo.getNegara()))
|
||||||
// alamat.setKecamatan(kecamatanConverter.transferVOToModel(alamatVo.getKecamatan(),
|
alamat.setNegara(negaraConverter.transferVOToModel(alamatVo.getNegara(), new Negara()));
|
||||||
// new Kecamatan()));
|
if (CommonUtil.isNotNullOrEmpty(alamatVo.getRekanan()))
|
||||||
|
alamat.setRekanan(rekananConverter.transferVOToModel(alamatVo.getRekanan(), new Rekanan()));
|
||||||
|
if (CommonUtil.isNotNullOrEmpty(alamatVo.getPegawai()))
|
||||||
|
alamat.setPegawai(loginUserConverter.transferVOToModel(alamatVo.getPegawai(), new LoginUser()));
|
||||||
alamat.setPasien(pasien);
|
alamat.setPasien(pasien);
|
||||||
listAlamat.add(alamat);
|
listAlamat.add(alamat);
|
||||||
}
|
}
|
||||||
pasien.getAlamats().addAll(listAlamat);
|
if (listAlamat.size() > 0)
|
||||||
|
pasien.getAlamats().addAll(listAlamat);
|
||||||
Pasien resultModel = pasienDao.save(pasien);
|
Pasien resultModel = pasienDao.save(pasien);
|
||||||
|
|
||||||
// return VO
|
|
||||||
PasienVO resultVo = new PasienVO();
|
PasienVO resultVo = new PasienVO();
|
||||||
pasienConverter.transferModelToVO(resultModel, resultVo);
|
pasienConverter.transferModelToVO(resultModel, resultVo);
|
||||||
|
|
||||||
return resultVo;
|
return resultVo;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -302,7 +302,6 @@ public class Alamat extends BaseMaster {
|
|||||||
|
|
||||||
@ManyToOne(fetch = FetchType.LAZY)
|
@ManyToOne(fetch = FetchType.LAZY)
|
||||||
@JoinColumn(name = "ObjectNegaraFk")
|
@JoinColumn(name = "ObjectNegaraFk")
|
||||||
@NotNull(message = "Kd Negara tidak boleh kosong")
|
|
||||||
|
|
||||||
@Caption(value = "Object Negara")
|
@Caption(value = "Object Negara")
|
||||||
private Negara negara;
|
private Negara negara;
|
||||||
|
|||||||
@ -60,7 +60,6 @@ public class Pasien extends BaseMasterPasien {
|
|||||||
|
|
||||||
@ManyToOne
|
@ManyToOne
|
||||||
@JoinColumn(name = "ObjectJenisKelaminFk")
|
@JoinColumn(name = "ObjectJenisKelaminFk")
|
||||||
@NotNull(message="Kd Jenis Kelamin tidak boleh kosong")
|
|
||||||
@Caption(value="Object Jenis Kelamin")
|
@Caption(value="Object Jenis Kelamin")
|
||||||
private JenisKelamin jenisKelamin;
|
private JenisKelamin jenisKelamin;
|
||||||
|
|
||||||
@ -93,7 +92,6 @@ public class Pasien extends BaseMasterPasien {
|
|||||||
|
|
||||||
@ManyToOne
|
@ManyToOne
|
||||||
@JoinColumn(name = "ObjectPendidikanFk")
|
@JoinColumn(name = "ObjectPendidikanFk")
|
||||||
@NotNull(message="Kd Pendidikan tidak boleh kosong")
|
|
||||||
@Caption(value="Object Pendidikan")
|
@Caption(value="Object Pendidikan")
|
||||||
private Pendidikan pendidikan;
|
private Pendidikan pendidikan;
|
||||||
|
|
||||||
|
|||||||
@ -1,10 +1,5 @@
|
|||||||
package com.jasamedika.medifirst2000.vo;
|
package com.jasamedika.medifirst2000.vo;
|
||||||
|
|
||||||
import javax.persistence.Column;
|
|
||||||
import javax.persistence.JoinColumn;
|
|
||||||
import javax.persistence.ManyToOne;
|
|
||||||
import javax.validation.constraints.NotNull;
|
|
||||||
|
|
||||||
import com.jasamedika.medifirst2000.base.vo.BaseMasterVO;
|
import com.jasamedika.medifirst2000.base.vo.BaseMasterVO;
|
||||||
import com.jasamedika.medifirst2000.helper.Caption;
|
import com.jasamedika.medifirst2000.helper.Caption;
|
||||||
|
|
||||||
@ -22,7 +17,6 @@ public class AlamatVO extends BaseMasterVO {
|
|||||||
this.alamatEmail = alamatEmail;
|
this.alamatEmail = alamatEmail;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Column(name = "AlamatEmail", nullable = true , length = 50)
|
|
||||||
public String getAlamatEmail(){
|
public String getAlamatEmail(){
|
||||||
return this.alamatEmail;
|
return this.alamatEmail;
|
||||||
}
|
}
|
||||||
@ -34,7 +28,6 @@ public class AlamatVO extends BaseMasterVO {
|
|||||||
this.alamatLengkap = alamatLengkap;
|
this.alamatLengkap = alamatLengkap;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Column(name = "AlamatLengkap", nullable = false , length = 200)
|
|
||||||
public String getAlamatLengkap(){
|
public String getAlamatLengkap(){
|
||||||
return this.alamatLengkap;
|
return this.alamatLengkap;
|
||||||
}
|
}
|
||||||
@ -46,7 +39,6 @@ public class AlamatVO extends BaseMasterVO {
|
|||||||
this.blackBerry = blackBerry;
|
this.blackBerry = blackBerry;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Column(name = "BlackBerry", nullable = true , length = 10)
|
|
||||||
public String getBlackBerry(){
|
public String getBlackBerry(){
|
||||||
return this.blackBerry;
|
return this.blackBerry;
|
||||||
}
|
}
|
||||||
@ -70,7 +62,6 @@ public class AlamatVO extends BaseMasterVO {
|
|||||||
this.facebook = facebook;
|
this.facebook = facebook;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Column(name = "Facebook", nullable = true , length = 50)
|
|
||||||
public String getFacebook(){
|
public String getFacebook(){
|
||||||
return this.facebook;
|
return this.facebook;
|
||||||
}
|
}
|
||||||
@ -82,7 +73,6 @@ public class AlamatVO extends BaseMasterVO {
|
|||||||
this.faksimile1 = faksimile1;
|
this.faksimile1 = faksimile1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Column(name = "Faksimile1", nullable = true , length = 15)
|
|
||||||
public String getFaksimile1(){
|
public String getFaksimile1(){
|
||||||
return this.faksimile1;
|
return this.faksimile1;
|
||||||
}
|
}
|
||||||
@ -94,7 +84,6 @@ public class AlamatVO extends BaseMasterVO {
|
|||||||
this.faksimile2 = faksimile2;
|
this.faksimile2 = faksimile2;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Column(name = "Faksimile2", nullable = true , length = 15)
|
|
||||||
public String getFaksimile2(){
|
public String getFaksimile2(){
|
||||||
return this.faksimile2;
|
return this.faksimile2;
|
||||||
}
|
}
|
||||||
@ -106,7 +95,6 @@ public class AlamatVO extends BaseMasterVO {
|
|||||||
this.fixedPhone1 = fixedPhone1;
|
this.fixedPhone1 = fixedPhone1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Column(name = "FixedPhone1", nullable = true , length = 15)
|
|
||||||
public String getFixedPhone1(){
|
public String getFixedPhone1(){
|
||||||
return this.fixedPhone1;
|
return this.fixedPhone1;
|
||||||
}
|
}
|
||||||
@ -118,7 +106,6 @@ public class AlamatVO extends BaseMasterVO {
|
|||||||
this.fixedPhone2 = fixedPhone2;
|
this.fixedPhone2 = fixedPhone2;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Column(name = "FixedPhone2", nullable = true , length = 15)
|
|
||||||
public String getFixedPhone2(){
|
public String getFixedPhone2(){
|
||||||
return this.fixedPhone2;
|
return this.fixedPhone2;
|
||||||
}
|
}
|
||||||
@ -127,7 +114,6 @@ public class AlamatVO extends BaseMasterVO {
|
|||||||
private Byte isBillingAddress;
|
private Byte isBillingAddress;
|
||||||
|
|
||||||
|
|
||||||
@Column(name = "isBillingAddress", nullable = false )
|
|
||||||
public Byte getIsBillingAddress() {
|
public Byte getIsBillingAddress() {
|
||||||
return isBillingAddress;
|
return isBillingAddress;
|
||||||
}
|
}
|
||||||
@ -140,7 +126,6 @@ public class AlamatVO extends BaseMasterVO {
|
|||||||
private Byte isPrimaryAddress;
|
private Byte isPrimaryAddress;
|
||||||
|
|
||||||
|
|
||||||
@Column(name = "isPrimaryAddress", nullable = false )
|
|
||||||
public Byte getIsPrimaryAddress() {
|
public Byte getIsPrimaryAddress() {
|
||||||
return isPrimaryAddress;
|
return isPrimaryAddress;
|
||||||
}
|
}
|
||||||
@ -152,7 +137,6 @@ public class AlamatVO extends BaseMasterVO {
|
|||||||
@Caption(value="Is Shipping Address")
|
@Caption(value="Is Shipping Address")
|
||||||
private Byte isShippingAddress;
|
private Byte isShippingAddress;
|
||||||
|
|
||||||
@Column(name = "isShippingAddress", nullable = false )
|
|
||||||
public Byte getIsShippingAddress() {
|
public Byte getIsShippingAddress() {
|
||||||
return isShippingAddress;
|
return isShippingAddress;
|
||||||
}
|
}
|
||||||
@ -164,7 +148,6 @@ public class AlamatVO extends BaseMasterVO {
|
|||||||
@Caption(value="Kode Alamat")
|
@Caption(value="Kode Alamat")
|
||||||
private Integer kdAlamat;
|
private Integer kdAlamat;
|
||||||
|
|
||||||
@Column(name = "KdAlamat", nullable = false )
|
|
||||||
public Integer getKdAlamat() {
|
public Integer getKdAlamat() {
|
||||||
return kdAlamat;
|
return kdAlamat;
|
||||||
}
|
}
|
||||||
@ -173,8 +156,6 @@ public class AlamatVO extends BaseMasterVO {
|
|||||||
this.kdAlamat = kdAlamat;
|
this.kdAlamat = kdAlamat;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ManyToOne
|
|
||||||
@JoinColumn(name = "ObjectDesaKelurahanFk")
|
|
||||||
@Caption(value="Object Desa Kelurahan")
|
@Caption(value="Object Desa Kelurahan")
|
||||||
private DesaKelurahanVO desaKelurahan;
|
private DesaKelurahanVO desaKelurahan;
|
||||||
|
|
||||||
@ -182,12 +163,10 @@ public class AlamatVO extends BaseMasterVO {
|
|||||||
this.desaKelurahan = desaKelurahan;
|
this.desaKelurahan = desaKelurahan;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Column(name = "KdDesaKelurahan", nullable = true )
|
|
||||||
public DesaKelurahanVO getDesaKelurahan(){
|
public DesaKelurahanVO getDesaKelurahan(){
|
||||||
return this.desaKelurahan;
|
return this.desaKelurahan;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Column(name = "ObjectDesaKelurahanFk", insertable=false,updatable=false)
|
|
||||||
private Integer desaKelurahanId;
|
private Integer desaKelurahanId;
|
||||||
|
|
||||||
|
|
||||||
@ -200,8 +179,6 @@ public class AlamatVO extends BaseMasterVO {
|
|||||||
this.desaKelurahanId = desaKelurahanId;
|
this.desaKelurahanId = desaKelurahanId;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ManyToOne
|
|
||||||
@JoinColumn(name = "ObjectHubunganKeluargaFk")
|
|
||||||
@Caption(value="Object Hubungan Keluarga")
|
@Caption(value="Object Hubungan Keluarga")
|
||||||
private HubunganKeluargaVO hubunganKeluarga;
|
private HubunganKeluargaVO hubunganKeluarga;
|
||||||
|
|
||||||
@ -209,12 +186,10 @@ public class AlamatVO extends BaseMasterVO {
|
|||||||
this.hubunganKeluarga = hubunganKeluarga;
|
this.hubunganKeluarga = hubunganKeluarga;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Column(name = "KdHubunganKeluarga", nullable = true )
|
|
||||||
public HubunganKeluargaVO getHubunganKeluarga(){
|
public HubunganKeluargaVO getHubunganKeluarga(){
|
||||||
return this.hubunganKeluarga;
|
return this.hubunganKeluarga;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Column(name = "ObjectHubunganKeluargaFk", insertable=false,updatable=false)
|
|
||||||
private Integer hubunganKeluargaId;
|
private Integer hubunganKeluargaId;
|
||||||
|
|
||||||
|
|
||||||
@ -227,9 +202,6 @@ public class AlamatVO extends BaseMasterVO {
|
|||||||
this.hubunganKeluargaId = hubunganKeluargaId;
|
this.hubunganKeluargaId = hubunganKeluargaId;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ManyToOne
|
|
||||||
@JoinColumn(name = "ObjectJenisAlamatFk")
|
|
||||||
@NotNull(message="Object Jenis AlamatVO Harus Diisi")
|
|
||||||
@Caption(value="Object Jenis Alamat")
|
@Caption(value="Object Jenis Alamat")
|
||||||
private JenisAlamatVO jenisAlamat;
|
private JenisAlamatVO jenisAlamat;
|
||||||
|
|
||||||
@ -237,12 +209,10 @@ public class AlamatVO extends BaseMasterVO {
|
|||||||
this.jenisAlamat = jenisAlamat;
|
this.jenisAlamat = jenisAlamat;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Column(name = "KdJenisAlamat", nullable = false )
|
|
||||||
public JenisAlamatVO getJenisAlamat(){
|
public JenisAlamatVO getJenisAlamat(){
|
||||||
return this.jenisAlamat;
|
return this.jenisAlamat;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Column(name = "ObjectJenisAlamatFk", insertable=false,updatable=false)
|
|
||||||
private Integer jenisAlamatId;
|
private Integer jenisAlamatId;
|
||||||
|
|
||||||
public Integer getJenisAlamatId() {
|
public Integer getJenisAlamatId() {
|
||||||
@ -253,8 +223,6 @@ public class AlamatVO extends BaseMasterVO {
|
|||||||
this.jenisAlamatId = jenisAlamatId;
|
this.jenisAlamatId = jenisAlamatId;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ManyToOne
|
|
||||||
@JoinColumn(name = "ObjectKecamatanFk")
|
|
||||||
@Caption(value="Object Kecamatan")
|
@Caption(value="Object Kecamatan")
|
||||||
private KecamatanVO kecamatan;
|
private KecamatanVO kecamatan;
|
||||||
|
|
||||||
@ -262,12 +230,10 @@ public class AlamatVO extends BaseMasterVO {
|
|||||||
this.kecamatan = kecamatan;
|
this.kecamatan = kecamatan;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Column(name = "KdKecamatan", nullable = true )
|
|
||||||
public KecamatanVO getKecamatan(){
|
public KecamatanVO getKecamatan(){
|
||||||
return this.kecamatan;
|
return this.kecamatan;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Column(name = "ObjectKecamatanFk", insertable=false,updatable=false)
|
|
||||||
private Integer kecamatanId;
|
private Integer kecamatanId;
|
||||||
|
|
||||||
|
|
||||||
@ -280,8 +246,6 @@ public class AlamatVO extends BaseMasterVO {
|
|||||||
this.kecamatanId = kecamatanId;
|
this.kecamatanId = kecamatanId;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ManyToOne
|
|
||||||
@JoinColumn(name = "ObjectKotaKabupatenFk")
|
|
||||||
@Caption(value="Object Kota Kabupaten")
|
@Caption(value="Object Kota Kabupaten")
|
||||||
private KotaKabupatenVO kotaKabupaten;
|
private KotaKabupatenVO kotaKabupaten;
|
||||||
|
|
||||||
@ -289,12 +253,10 @@ public class AlamatVO extends BaseMasterVO {
|
|||||||
this.kotaKabupaten = kotaKabupaten;
|
this.kotaKabupaten = kotaKabupaten;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Column(name = "KdKotaKabupaten", nullable = true )
|
|
||||||
public KotaKabupatenVO getKotaKabupaten(){
|
public KotaKabupatenVO getKotaKabupaten(){
|
||||||
return this.kotaKabupaten;
|
return this.kotaKabupaten;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Column(name = "ObjectKotaKabupatenFk", insertable=false,updatable=false)
|
|
||||||
private Integer kotaKabupatenId;
|
private Integer kotaKabupatenId;
|
||||||
|
|
||||||
|
|
||||||
@ -306,9 +268,6 @@ public class AlamatVO extends BaseMasterVO {
|
|||||||
this.kotaKabupatenId = kotaKabupatenId;
|
this.kotaKabupatenId = kotaKabupatenId;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ManyToOne
|
|
||||||
@JoinColumn(name = "ObjectNegaraFk")
|
|
||||||
@NotNull(message="Object NegaraVO Harus Diisi")
|
|
||||||
@Caption(value="Object Negara")
|
@Caption(value="Object Negara")
|
||||||
private NegaraVO negara;
|
private NegaraVO negara;
|
||||||
|
|
||||||
@ -316,12 +275,10 @@ public class AlamatVO extends BaseMasterVO {
|
|||||||
this.negara = negara;
|
this.negara = negara;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Column(name = "KdNegara", nullable = false )
|
|
||||||
public NegaraVO getNegara(){
|
public NegaraVO getNegara(){
|
||||||
return this.negara;
|
return this.negara;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Column(name = "ObjectNegaraFk", insertable=false,updatable=false)
|
|
||||||
private Integer negaraId;
|
private Integer negaraId;
|
||||||
|
|
||||||
|
|
||||||
@ -333,8 +290,6 @@ public class AlamatVO extends BaseMasterVO {
|
|||||||
this.negaraId = negaraId;
|
this.negaraId = negaraId;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ManyToOne
|
|
||||||
@JoinColumn(name = "ObjectPegawaiFk")
|
|
||||||
@Caption(value="Object Pegawai")
|
@Caption(value="Object Pegawai")
|
||||||
private LoginUserVO pegawai;
|
private LoginUserVO pegawai;
|
||||||
|
|
||||||
@ -342,12 +297,10 @@ public class AlamatVO extends BaseMasterVO {
|
|||||||
this.pegawai = pegawai;
|
this.pegawai = pegawai;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Column(name = "KdPegawai", nullable = true , length = 5)
|
|
||||||
public LoginUserVO getPegawai(){
|
public LoginUserVO getPegawai(){
|
||||||
return this.pegawai;
|
return this.pegawai;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Column(name = "ObjectPegawaiFk", insertable=false,updatable=false)
|
|
||||||
private Integer pegawaiId;
|
private Integer pegawaiId;
|
||||||
|
|
||||||
|
|
||||||
@ -360,9 +313,6 @@ public class AlamatVO extends BaseMasterVO {
|
|||||||
this.pegawaiId = pegawaiId;
|
this.pegawaiId = pegawaiId;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ManyToOne
|
|
||||||
@JoinColumn(name = "ObjectPropinsiFk")
|
|
||||||
@NotNull(message="Object PropinsiVO Harus Diisi")
|
|
||||||
@Caption(value="Object Propinsi")
|
@Caption(value="Object Propinsi")
|
||||||
private PropinsiVO propinsi;
|
private PropinsiVO propinsi;
|
||||||
|
|
||||||
@ -370,12 +320,10 @@ public class AlamatVO extends BaseMasterVO {
|
|||||||
this.propinsi = propinsi;
|
this.propinsi = propinsi;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Column(name = "KdPropinsi", nullable = false )
|
|
||||||
public PropinsiVO getPropinsi(){
|
public PropinsiVO getPropinsi(){
|
||||||
return this.propinsi;
|
return this.propinsi;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Column(name = "ObjectPropinsiFk", insertable=false,updatable=false)
|
|
||||||
private Integer propinsiId;
|
private Integer propinsiId;
|
||||||
|
|
||||||
|
|
||||||
@ -388,8 +336,6 @@ public class AlamatVO extends BaseMasterVO {
|
|||||||
this.propinsiId = propinsiId;
|
this.propinsiId = propinsiId;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ManyToOne
|
|
||||||
@JoinColumn(name = "ObjectRekananFk")
|
|
||||||
@Caption(value="Object Rekanan")
|
@Caption(value="Object Rekanan")
|
||||||
private RekananVO rekanan;
|
private RekananVO rekanan;
|
||||||
|
|
||||||
@ -397,12 +343,10 @@ public class AlamatVO extends BaseMasterVO {
|
|||||||
this.rekanan = rekanan;
|
this.rekanan = rekanan;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Column(name = "KdRekanan", nullable = true )
|
|
||||||
public RekananVO getRekanan(){
|
public RekananVO getRekanan(){
|
||||||
return this.rekanan;
|
return this.rekanan;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Column(name = "ObjectRekananFk", insertable=false,updatable=false)
|
|
||||||
private Integer rekananId;
|
private Integer rekananId;
|
||||||
|
|
||||||
|
|
||||||
@ -417,7 +361,6 @@ public class AlamatVO extends BaseMasterVO {
|
|||||||
@Caption(value="Kecamatan")
|
@Caption(value="Kecamatan")
|
||||||
private String namaKecamatan;
|
private String namaKecamatan;
|
||||||
|
|
||||||
@Column(name = "Kecamatan", nullable = true , length = 50)
|
|
||||||
public String getNamaKecamatan() {
|
public String getNamaKecamatan() {
|
||||||
return namaKecamatan;
|
return namaKecamatan;
|
||||||
}
|
}
|
||||||
@ -433,7 +376,6 @@ public class AlamatVO extends BaseMasterVO {
|
|||||||
this.keteranganLainnya = keteranganLainnya;
|
this.keteranganLainnya = keteranganLainnya;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Column(name = "KeteranganLainnya", nullable = true , length = 150)
|
|
||||||
public String getKeteranganLainnya(){
|
public String getKeteranganLainnya(){
|
||||||
return this.keteranganLainnya;
|
return this.keteranganLainnya;
|
||||||
}
|
}
|
||||||
@ -442,7 +384,6 @@ public class AlamatVO extends BaseMasterVO {
|
|||||||
private String kodePos;
|
private String kodePos;
|
||||||
|
|
||||||
|
|
||||||
@Column(name = "KodePos", nullable = true , length = 10)
|
|
||||||
public String getKodePos() {
|
public String getKodePos() {
|
||||||
return kodePos;
|
return kodePos;
|
||||||
}
|
}
|
||||||
@ -454,7 +395,6 @@ public class AlamatVO extends BaseMasterVO {
|
|||||||
@Caption(value="Kota Kabupaten")
|
@Caption(value="Kota Kabupaten")
|
||||||
private String namaKotaKabupaten;
|
private String namaKotaKabupaten;
|
||||||
|
|
||||||
@Column(name = "KotaKabupaten", nullable = true , length = 50)
|
|
||||||
public String getNamaKotaKabupaten() {
|
public String getNamaKotaKabupaten() {
|
||||||
return namaKotaKabupaten;
|
return namaKotaKabupaten;
|
||||||
}
|
}
|
||||||
@ -470,7 +410,6 @@ public class AlamatVO extends BaseMasterVO {
|
|||||||
this.line = line;
|
this.line = line;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Column(name = "Line", nullable = true , length = 50)
|
|
||||||
public String getLine(){
|
public String getLine(){
|
||||||
return this.line;
|
return this.line;
|
||||||
}
|
}
|
||||||
@ -482,7 +421,6 @@ public class AlamatVO extends BaseMasterVO {
|
|||||||
this.mobilePhone1 = mobilePhone1;
|
this.mobilePhone1 = mobilePhone1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Column(name = "MobilePhone1", nullable = true , length = 15)
|
|
||||||
public String getMobilePhone1(){
|
public String getMobilePhone1(){
|
||||||
return this.mobilePhone1;
|
return this.mobilePhone1;
|
||||||
}
|
}
|
||||||
@ -494,7 +432,6 @@ public class AlamatVO extends BaseMasterVO {
|
|||||||
this.mobilePhone2 = mobilePhone2;
|
this.mobilePhone2 = mobilePhone2;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Column(name = "MobilePhone2", nullable = true , length = 15)
|
|
||||||
public String getMobilePhone2(){
|
public String getMobilePhone2(){
|
||||||
return this.mobilePhone2;
|
return this.mobilePhone2;
|
||||||
}
|
}
|
||||||
@ -506,19 +443,13 @@ public class AlamatVO extends BaseMasterVO {
|
|||||||
this.namaTempatGedung = namaTempatGedung;
|
this.namaTempatGedung = namaTempatGedung;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Column(name = "NamaTempatGedung", nullable = true , length = 150)
|
|
||||||
public String getNamaTempatGedung(){
|
public String getNamaTempatGedung(){
|
||||||
return this.namaTempatGedung;
|
return this.namaTempatGedung;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ManyToOne
|
|
||||||
@JoinColumn(name = "NoCMFk")
|
|
||||||
@Caption(value="No C M")
|
@Caption(value="No C M")
|
||||||
//@JsonBackReference
|
|
||||||
private PasienVO pasien;
|
private PasienVO pasien;
|
||||||
|
|
||||||
@Column(name = "NoCM", nullable = true , length = 15)
|
|
||||||
public PasienVO getPasien() {
|
public PasienVO getPasien() {
|
||||||
return pasien;
|
return pasien;
|
||||||
}
|
}
|
||||||
@ -527,7 +458,6 @@ public class AlamatVO extends BaseMasterVO {
|
|||||||
this.pasien = pasien;
|
this.pasien = pasien;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Column(name = "NoCMFk", insertable=false,updatable=false)
|
|
||||||
private Integer pasienId;
|
private Integer pasienId;
|
||||||
|
|
||||||
|
|
||||||
@ -556,7 +486,6 @@ public class AlamatVO extends BaseMasterVO {
|
|||||||
@Caption(value="Twitter")
|
@Caption(value="Twitter")
|
||||||
private String twitter;
|
private String twitter;
|
||||||
|
|
||||||
@Column(name = "Twitter", nullable = true , length = 50)
|
|
||||||
public String getTwitter() {
|
public String getTwitter() {
|
||||||
return twitter;
|
return twitter;
|
||||||
}
|
}
|
||||||
@ -572,7 +501,6 @@ public class AlamatVO extends BaseMasterVO {
|
|||||||
this.website = website;
|
this.website = website;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Column(name = "Website", nullable = true , length = 80)
|
|
||||||
public String getWebsite(){
|
public String getWebsite(){
|
||||||
return this.website;
|
return this.website;
|
||||||
}
|
}
|
||||||
@ -584,7 +512,6 @@ public class AlamatVO extends BaseMasterVO {
|
|||||||
this.whatsApp = whatsApp;
|
this.whatsApp = whatsApp;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Column(name = "WhatsApp", nullable = true , length = 15)
|
|
||||||
public String getWhatsApp(){
|
public String getWhatsApp(){
|
||||||
return this.whatsApp;
|
return this.whatsApp;
|
||||||
}
|
}
|
||||||
@ -596,7 +523,6 @@ public class AlamatVO extends BaseMasterVO {
|
|||||||
this.yahooMessenger = yahooMessenger;
|
this.yahooMessenger = yahooMessenger;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Column(name = "YahooMessenger", nullable = true , length = 50)
|
|
||||||
public String getYahooMessenger(){
|
public String getYahooMessenger(){
|
||||||
return this.yahooMessenger;
|
return this.yahooMessenger;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,22 +1,16 @@
|
|||||||
package com.jasamedika.medifirst2000.vo;
|
package com.jasamedika.medifirst2000.vo;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.util.Date;
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
import javax.persistence.*;
|
import javax.persistence.CascadeType;
|
||||||
import java.util.Date;
|
import javax.persistence.FetchType;
|
||||||
import org.hibernate.validator.constraints.NotEmpty;
|
import javax.persistence.ManyToOne;
|
||||||
|
import javax.persistence.OneToMany;
|
||||||
import com.jasamedika.medifirst2000.base.vo.BaseMasterVO;
|
import javax.persistence.Transient;
|
||||||
import com.jasamedika.medifirst2000.entities.Alamat;
|
|
||||||
|
|
||||||
import javax.validation.constraints.NotNull;
|
import javax.validation.constraints.NotNull;
|
||||||
import org.hibernate.validator.constraints.Length;
|
|
||||||
import org.hibernate.validator.internal.util.logging.Messages;
|
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonBackReference;
|
|
||||||
import com.fasterxml.jackson.annotation.JsonManagedReference;
|
|
||||||
import com.jasamedika.medifirst2000.base.vo.BaseMasterVO;
|
import com.jasamedika.medifirst2000.base.vo.BaseMasterVO;
|
||||||
import com.jasamedika.medifirst2000.helper.Caption;
|
import com.jasamedika.medifirst2000.helper.Caption;
|
||||||
|
|
||||||
@ -42,7 +36,6 @@ public class PasienVO extends BaseMasterVO {
|
|||||||
private GolonganDarahVO golonganDarah;
|
private GolonganDarahVO golonganDarah;
|
||||||
|
|
||||||
@ManyToOne
|
@ManyToOne
|
||||||
@NotNull(message="Kd Jenis Kelamin tidak boleh kosong")
|
|
||||||
@Caption(value="Object Jenis Kelamin")
|
@Caption(value="Object Jenis Kelamin")
|
||||||
private JenisKelaminVO jenisKelamin;
|
private JenisKelaminVO jenisKelamin;
|
||||||
|
|
||||||
@ -59,7 +52,6 @@ public class PasienVO extends BaseMasterVO {
|
|||||||
private KebangsaanVO kebangsaan;
|
private KebangsaanVO kebangsaan;
|
||||||
|
|
||||||
@ManyToOne
|
@ManyToOne
|
||||||
@NotNull(message="Kd Pendidikan tidak boleh kosong")
|
|
||||||
@Caption(value="Object Pendidikan")
|
@Caption(value="Object Pendidikan")
|
||||||
private PendidikanVO pendidikan;
|
private PendidikanVO pendidikan;
|
||||||
|
|
||||||
@ -68,7 +60,6 @@ public class PasienVO extends BaseMasterVO {
|
|||||||
private StatusPerkawinanVO statusPerkawinan;
|
private StatusPerkawinanVO statusPerkawinan;
|
||||||
|
|
||||||
@ManyToOne
|
@ManyToOne
|
||||||
@NotNull(message="Object Title Harus Diisi")
|
|
||||||
@Caption(value="Object Title")
|
@Caption(value="Object Title")
|
||||||
private TitlePasienVO title;
|
private TitlePasienVO title;
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user