本文整理汇总了Java中org.oscarehr.common.model.Provider.setSex方法的典型用法代码示例。如果您正苦于以下问题:Java Provider.setSex方法的具体用法?Java Provider.setSex怎么用?Java Provider.setSex使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.oscarehr.common.model.Provider
的用法示例。
在下文中一共展示了Provider.setSex方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getAsDomainObject
import org.oscarehr.common.model.Provider; //导入方法依赖的package包/类
@Override
public Provider getAsDomainObject(LoggedInInfo loggedInInfo,ProviderTo1 t) throws ConversionException {
Provider d = new Provider();
d.setProviderNo(t.getProviderNo());
d.setComments(t.getComments());
d.setPhone(t.getPhone());
d.setBillingNo(t.getBillingNo());
d.setWorkPhone(t.getWorkPhone());
d.setAddress(t.getAddress().getAddress());
d.setTeam(t.getTeam());
d.setStatus(ConversionUtils.toBoolString(t.isEnabled()));
d.setLastUpdateDate(t.getLastUpdateDate());
d.setProviderType(t.getProviderActivity());
if (t.getSex() != null) {
d.setSex(t.getSex().name());
}
d.setOhipNo(t.getOhipNo());
d.setSpecialty(t.getSpecialty());
d.setDob(t.getDob());
d.setHsoNo(t.getHsoNo());
d.setProviderActivity(t.getProviderActivity());
d.setFirstName(t.getFirstName());
d.setLastName(t.getLastName());
d.setRmaNo(t.getRmaNo());
d.setSignedConfidentiality(t.getSignedConfidentiality());
d.setPractitionerNo(t.getPractitionerNo());
d.setEmail(t.getEmail());
d.setTitle(t.getTitle());
d.setLastUpdateUser(t.getLastUpdateUser());
d.setLastUpdateDate(t.getLastUpdateDate());
return d;
}
示例2: getProvider
import org.oscarehr.common.model.Provider; //导入方法依赖的package包/类
Provider getProvider(String firstName,String lastName,String providerNo,String ohipNo,String providerType,String specialty,String sex){
Provider provider = new Provider();
provider.setFirstName(firstName);
provider.setLastName(lastName);
provider.setProviderNo(providerNo);
provider.setOhipNo(ohipNo);
provider.setSpecialty(specialty);
provider.setProviderType(providerType);
provider.setSex(sex);
provider.setSignedConfidentiality(new Date());
provider.setStatus("1");
return provider;
}
示例3: addProvider
import org.oscarehr.common.model.Provider; //导入方法依赖的package包/类
@Override
public void addProvider(Attributes attributes) {
Provider provider = new Provider();
provider.setProviderNo(attributes.getValue("no"));
String gender = attributes.getValue("gender");
if (gender != null) {
provider.setSex("" + gender.charAt(0));
}
provider.setTitle(attributes.getValue("title"));
provider.setFirstName(attributes.getValue("firstName"));
provider.setLastName(attributes.getValue("lastName"));
provider.setAddress(attributes.getValue("address"));
provider.setEmail(attributes.getValue("email"));
provider.setPhone(attributes.getValue("phone"));
provider.setProviderType(attributes.getValue("type"));
provider.setSpecialty("specialty");
provider.setLastUpdateDate(new Date());
provider.setStatus("1");
providerDao.saveProvider(provider);
provider.setOhipNo(provider.getProviderNo());
provider.setBillingNo(provider.getProviderNo());
providerDao.updateProvider(provider);
if (logger.isInfoEnabled()) {
logger.info("Created new provider: " + provider);
}
}
示例4: testCreate
import org.oscarehr.common.model.Provider; //导入方法依赖的package包/类
@Test
public void testCreate() throws Exception {
Facility f = new Facility();
f.setDescription("test");
f.setDisabled(false);
f.setName("test");
f.setOcanServiceOrgNumber("0");
f.setOrgId(0);
f.setSectorId(0);
facilityDao.persist(f);
Demographic d = new Demographic();
d.setFirstName("a");
d.setLastName("b");
d.setYearOfBirth("2000");
d.setMonthOfBirth("1");
d.setDateOfBirth("1");
d.setSex("M");
demographicDao.save(d);
Provider p = new Provider();
p.setLastName("x");
p.setFirstName("y");
p.setProviderNo("111111");
p.setProviderType("doctor");
p.setSex("M");
p.setDob(new java.util.Date());
p.setSpecialty("MD");
providerDao.saveProvider(p);
HnrDataValidation entity = new HnrDataValidation();
EntityDataGenerator.generateTestDataForModelClass(entity);
entity.setFacilityId(f.getId());
entity.setClientId(d.getDemographicNo());
entity.setValidatorProviderNo(p.getProviderNo());
entity.setValidationType(HnrDataValidation.Type.HC_INFO);
dao.persist(entity);
assertNotNull(entity.getId());
}
示例5: testManyToManyRelationship
import org.oscarehr.common.model.Provider; //导入方法依赖的package包/类
@Test
public void testManyToManyRelationship() throws Exception {
Site entity = new Site();
EntityDataGenerator.generateTestDataForModelClass(entity);
entity.setStatus((byte)1);
entity.setShortName("name1");
dao.persist(entity);
assertNotNull(entity.getId());
Integer siteId1 = entity.getId();
entity = new Site();
EntityDataGenerator.generateTestDataForModelClass(entity);
entity.setStatus((byte)1);
entity.setShortName("name2");
dao.persist(entity);
assertNotNull(entity.getId());
Integer siteId2 = entity.getId();
//create a provider
Provider p = new Provider();
p.setProviderNo("000001");
p.setLastName("Smith");
p.setFirstName("John");
p.setProviderType("doctor");
p.setDob(new Date());
p.setLastUpdateUser("999998");
p.setLastUpdateDate(new Date());
p.setSex("M");
p.setSpecialty("");
ProviderDao providerDao = (ProviderDao)SpringUtils.getBean("providerDao");
providerDao.saveProvider(p);
ProviderSiteDao providerSiteDao = SpringUtils.getBean(ProviderSiteDao.class);
ProviderSite ps = new ProviderSite();
ps.setId(new ProviderSitePK());
ps.getId().setProviderNo(p.getProviderNo());
ps.getId().setSiteId(siteId1);
providerSiteDao.persist(ps);
ps = new ProviderSite();
ps.setId(new ProviderSitePK());
ps.getId().setProviderNo(p.getProviderNo());
ps.getId().setSiteId(siteId2);
providerSiteDao.persist(ps);
Site s = dao.find(siteId1);
assertNotNull(s.getProviders());
assertEquals(s.getProviders().size(),1);
}
示例6: testCreate
import org.oscarehr.common.model.Provider; //导入方法依赖的package包/类
@Test
public void testCreate() throws Exception {
Facility f = new Facility();
f.setDescription("test");
f.setDisabled(false);
f.setName("test");
f.setOcanServiceOrgNumber("0");
f.setOrgId(0);
f.setSectorId(0);
facilityDao.persist(f);
Demographic d = new Demographic();
d.setFirstName("a");
d.setLastName("b");
d.setYearOfBirth("2000");
d.setMonthOfBirth("1");
d.setDateOfBirth("1");
d.setSex("M");
demographicDao.save(d);
Provider p = new Provider();
p.setLastName("x");
p.setFirstName("y");
p.setProviderNo("111111");
p.setProviderType("doctor");
p.setSex("M");
p.setDob(new java.util.Date());
p.setSpecialty("MD");
providerDao.saveProvider(p);
IntegratorConsent entity = new IntegratorConsent();
EntityDataGenerator.generateTestDataForModelClass(entity);
entity.setClientConsentStatus(ConsentStatus.GIVEN);
entity.setSignatureStatus(SignatureStatus.ELECTRONIC);
entity.setDemographicId(d.getDemographicNo());
entity.setDigitalSignatureId(null);
entity.setFacilityId(f.getId());
entity.setProviderNo(p.getProviderNo());
dao.persist(entity);
assertNotNull(entity.getId());
}
示例7: testCreate
import org.oscarehr.common.model.Provider; //导入方法依赖的package包/类
@Test
public void testCreate() throws Exception {
Facility f = new Facility();
f.setDescription("test");
f.setDisabled(false);
f.setName("test");
f.setOcanServiceOrgNumber("0");
f.setOrgId(0);
f.setSectorId(0);
facilityDao.persist(f);
Demographic d = new Demographic();
d.setFirstName("a");
d.setLastName("b");
d.setYearOfBirth("2000");
d.setMonthOfBirth("1");
d.setDateOfBirth("1");
d.setSex("M");
demographicDao.save(d);
Provider p = new Provider();
p.setLastName("x");
p.setFirstName("y");
p.setProviderNo("111111");
p.setProviderType("doctor");
p.setSex("M");
p.setDob(new java.util.Date());
p.setSpecialty("MD");
providerDao.saveProvider(p);
DigitalSignature entity = new DigitalSignature();
EntityDataGenerator.generateTestDataForModelClass(entity);
entity.setDemographicId(d.getDemographicNo());
entity.setFacilityId(f.getId());
entity.setProviderNo(p.getProviderNo());
byte[] b = new byte[1024];
for(int x=0;x<b.length;x++) {
b[x] = (byte)0x01;
}
entity.setSignatureImage(b);
dao.persist(entity);
assertNotNull(entity.getId());
}
示例8: testSave
import org.oscarehr.common.model.Provider; //导入方法依赖的package包/类
@Test
public void testSave() throws Exception {
Demographic d = new Demographic();
d.setFirstName("Test");
d.setLastName("Patient");
d.setPatientStatus("AC");
d.setYearOfBirth("1978");
d.setMonthOfBirth("04");
d.setDateOfBirth("26");
d.setHin("2222222222");
d.setHcType("ON");
d.setDateJoined(new Date());
d.setSex("M");
demographicDao.save(d);
Provider p = new Provider();
p.setFirstName("John");
p.setLastName("Hancock");
p.setStatus("1");
p.setProviderNo("000001");
p.setProviderType("doctor");
p.setSex("M");
p.setSpecialty("");
providerDao.saveProvider(p);
Program prog = new Program();
prog.setName("test");
prog.setMaxAllowed(100);
programDao.saveProgram(prog);
Tickler entity = new Tickler();
EntityDataGenerator.generateTestDataForModelClass(entity);
entity.setDemographicNo(d.getDemographicNo());
entity.setCreator("999998");
entity.setTaskAssignedTo("000001");
//i'm testing the not found attribute here
entity.setProgramId(9999);
TicklerUpdate tu = new TicklerUpdate();
tu.setAssignedTo("999998");
tu.setPriority("Normal");
tu.setProviderNo("999998");
tu.setServiceDate(new Date());
tu.setStatus(Tickler.STATUS.A);
tu.setUpdateDate(new Date());
TicklerComment tc = new TicklerComment();
tc.setMessage("message");
tc.setProviderNo("999998");
tc.setUpdateDate(new Date());
dao.persist(entity);
assertNotNull(entity.getId());
tu.setTicklerNo(entity.getId());
dao.persist(tu);
tc.setTicklerNo(entity.getId());
dao.persist(tc);
Tickler t = dao.find(entity.getId());
assertTrue(1 == t.getUpdates().size());
assertTrue(1 == t.getComments().size());
assertTrue(t.getDemographic() != null);
assertTrue(t.getProvider() != null);
assertTrue(t.getAssignee() != null);
assertTrue(t.getProgram() == null);
assertTrue(t.getUpdates().iterator().next().getProvider() != null);
assertTrue(t.getComments().iterator().next().getProvider() != null);
}