当前位置: 首页>>代码示例>>Java>>正文


Java Provider.setLastName方法代码示例

本文整理汇总了Java中org.oscarehr.common.model.Provider.setLastName方法的典型用法代码示例。如果您正苦于以下问题:Java Provider.setLastName方法的具体用法?Java Provider.setLastName怎么用?Java Provider.setLastName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.oscarehr.common.model.Provider的用法示例。


在下文中一共展示了Provider.setLastName方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: parsePrdAsProvider

import org.oscarehr.common.model.Provider; //导入方法依赖的package包/类
/**
 * @return a detached and non-persisted Provider model object with data filed in from the PRD.
 * @throws HL7Exception
 */
public static Provider parsePrdAsProvider(PRD prd) throws HL7Exception {
	Provider provider = new Provider();

	XPN xpn = prd.getProviderName(0);
	provider.setLastName(StringUtils.trimToNull(xpn.getFamilyName().getSurname().getValue()));
	provider.setFirstName(StringUtils.trimToNull(xpn.getGivenName().getValue()));
	provider.setTitle(StringUtils.trimToNull(xpn.getPrefixEgDR().getValue()));

	XAD xad = prd.getProviderAddress(0);
	provider.setAddress(StringUtils.trimToNull(xad.getStreetAddress().getStreetOrMailingAddress().getValue()));

	XTN xtn = prd.getProviderCommunicationInformation(0);
	provider.setWorkPhone(StringUtils.trimToNull(xtn.getUnformattedTelephoneNumber().getValue()));
	provider.setEmail(StringUtils.trimToNull(xtn.getCommunicationAddress().getValue()));

	PLN pln = prd.getProviderIdentifiers(0);
	provider.setProviderNo(StringUtils.trimToNull(pln.getIDNumber().getValue()));

	return (provider);
}
 
开发者ID:williamgrosset,项目名称:OSCAR-ConCert,代码行数:25,代码来源:DataTypeUtils.java

示例2: parseRolAsProvider

import org.oscarehr.common.model.Provider; //导入方法依赖的package包/类
/**
 * The provider returned is just a detached/unmanaged Provider object which may not represent an entry in the db, it is used as a data structure only.
 * 
 * @throws HL7Exception
 */
public static Provider parseRolAsProvider(ROL rol) throws HL7Exception {
	Provider provider = new Provider();

	XCN xcn = rol.getRolePerson(0);
	provider.setProviderNo(StringUtils.trimToNull(xcn.getIDNumber().getValue()));
	provider.setLastName(StringUtils.trimToNull(xcn.getFamilyName().getSurname().getValue()));
	provider.setFirstName(StringUtils.trimToNull(xcn.getGivenName().getValue()));
	provider.setTitle(StringUtils.trimToNull(xcn.getPrefixEgDR().getValue()));

	XAD xad = rol.getOfficeHomeAddressBirthplace(0);
	provider.setAddress(StringUtils.trimToNull(xad.getStreetAddress().getStreetOrMailingAddress().getValue()));

	XTN xtn = rol.getPhone(0);
	provider.setPhone(StringUtils.trimToNull(xtn.getUnformattedTelephoneNumber().getValue()));
	provider.setEmail(StringUtils.trimToNull(xtn.getCommunicationAddress().getValue()));

	return (provider);
}
 
开发者ID:williamgrosset,项目名称:OSCAR-ConCert,代码行数:24,代码来源:DataTypeUtils.java

示例3: testProhibitedRecord

import org.oscarehr.common.model.Provider; //导入方法依赖的package包/类
@Test(expected=AccessDeniedException.class)
public void testProhibitedRecord() {
	try{
		MockSecurityInfoManager mockSecurityInfoManager = new MockSecurityInfoManager();
		mockSecurityInfoManager.setAccessPatientRecord(false);//access prohibited
		mockE2ECDAService.setSecurityInfoManager(mockSecurityInfoManager);
		LoggedInInfo loggedInInfo = new LoggedInInfo();
		mockE2ECDAService.setLoggedInInfo(loggedInInfo);
		
		Provider loggedInProvider = new Provider();
		loggedInProvider.setFirstName("Test");
		loggedInProvider.setLastName("Doe");
		
		loggedInInfo.setLoggedInProvider(loggedInProvider);
		mockE2ECDAService.getDemographicData(1);
	}
	catch(AccessDeniedException expectedException) {
		throw expectedException;
	}
	catch(RuntimeException e) {
		e.printStackTrace();
		throw e;
	}
}
 
开发者ID:williamgrosset,项目名称:OSCAR-ConCert,代码行数:25,代码来源:E2ECDAServiceTest.java

示例4: 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;
}
 
开发者ID:williamgrosset,项目名称:OSCAR-ConCert,代码行数:35,代码来源:ProviderConverter.java

示例5: main

import org.oscarehr.common.model.Provider; //导入方法依赖的package包/类
public static void main(String... argv) throws Exception {
	// this is here just to test some of the above functions since
	// we are not using junit tests...

	Clinic clinic = new Clinic();
	clinic.setClinicName("test clinic");
	clinic.setClinicAddress("123 my street");
	clinic.setClinicCity("my city");
	clinic.setClinicProvince("bc");
	clinic.setClinicPhone("12345");

	Provider provider = new Provider();
	provider.setProviderNo("9999");
	provider.setLastName("p_lname");
	provider.setFirstName("p_fname");
	provider.setTitle("DR");

	Demographic demographic = new Demographic();
	demographic.setDemographicNo(8383);
	demographic.setLastName("d_lname");
	demographic.setFirstName("d_fname");
	demographic.setSex("M");
	demographic.setBirthDay(new GregorianCalendar(1902, 04, 05));

	Prescription prescription = new Prescription();
	prescription.setDatePrescribed(new Date());
	prescription.setComments("this is a fake prescription");

	ArrayList<Drug> drugs = new ArrayList<Drug>();

	OMP_O09 prescriptionMsg = makeOmpO09(clinic, provider, demographic, prescription, drugs);

	String messageString = OscarToOscarUtils.pipeParser.encode(prescriptionMsg);
	logger.info(messageString);
}
 
开发者ID:williamgrosset,项目名称:OSCAR-ConCert,代码行数:36,代码来源:OmpO09.java

示例6: 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;
}
 
开发者ID:williamgrosset,项目名称:OSCAR-ConCert,代码行数:14,代码来源:RemoteIntegratedDataCopyDaoTest.java

示例7: 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);
	}
}
 
开发者ID:williamgrosset,项目名称:OSCAR-ConCert,代码行数:32,代码来源:DataUtils.java

示例8: 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());
}
 
开发者ID:williamgrosset,项目名称:OSCAR-ConCert,代码行数:40,代码来源:HnrDataValidationDaoTest.java

示例9: main

import org.oscarehr.common.model.Provider; //导入方法依赖的package包/类
public static void main(String... argv) throws Exception {
	// this is here just to test some of the above functions since 
	// we are not using junit tests...
	
	Clinic clinic=new Clinic();
	clinic.setClinicName("test clinic");
	clinic.setClinicAddress("123 my street");
	clinic.setClinicCity("my city");
	clinic.setClinicProvince("bc");
	clinic.setClinicPhone("12345");

	Demographic demographic = new Demographic();
	demographic.setLastName("test LN");
	demographic.setLastName("test FN");
	demographic.setBirthDay(new GregorianCalendar(1960, 2, 3));

	ObservationData observationData = new ObservationData();
	observationData.subject="txt test";
	observationData.textMessage="once upon a time";
	observationData.binaryDataFileName="/tmp/oscar.properties";
	byte[] b=FileUtils.readFileToByteArray(new File(observationData.binaryDataFileName));
	observationData.binaryData = b;

	Provider sender = new Provider();
	sender.setProviderNo("111");
	sender.setLastName("sender ln");
	sender.setFirstName("sender fn");

	ProfessionalSpecialist receiver = new ProfessionalSpecialist();
	receiver.setLastName("receiver ln");
	receiver.setFirstName("receiver fn");
	receiver.setProfessionalLetters("Dr");

	ORU_R01 observationMsg = makeOruR01(clinic, demographic, observationData, sender, receiver);

	String messageString = OscarToOscarUtils.pipeParser.encode(observationMsg);
	logger.info(messageString);

	ORU_R01 newObservationMsg = (ORU_R01) OscarToOscarUtils.pipeParser.parse(messageString);
	byte[] decoded = DataTypeUtils.getNteCommentsAsSingleDecodedByteArray(newObservationMsg.getPATIENT_RESULT(0).getORDER_OBSERVATION(0).getNTE(1));
	logger.info("equal binary data:" + Arrays.equals(b, decoded));
	logger.info("text data:" + new String(DataTypeUtils.getNteCommentsAsSingleDecodedByteArray(newObservationMsg.getPATIENT_RESULT(0).getORDER_OBSERVATION(0).getNTE(0)), MiscUtils.DEFAULT_UTF8_ENCODING));
	FileUtils.writeByteArrayToFile(new File("/tmp/out.test"), decoded);
}
 
开发者ID:williamgrosset,项目名称:OSCAR-ConCert,代码行数:45,代码来源:OruR01.java

示例10: 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);
}
 
开发者ID:williamgrosset,项目名称:OSCAR-ConCert,代码行数:50,代码来源:SiteDaoTest.java

示例11: 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());
}
 
开发者ID:williamgrosset,项目名称:OSCAR-ConCert,代码行数:43,代码来源:IntegratorConsentDaoTest.java

示例12: 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());
}
 
开发者ID:williamgrosset,项目名称:OSCAR-ConCert,代码行数:44,代码来源:DigitalSignatureDaoTest.java

示例13: 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);
}
 
开发者ID:williamgrosset,项目名称:OSCAR-ConCert,代码行数:74,代码来源:TicklerDaoTest.java


注:本文中的org.oscarehr.common.model.Provider.setLastName方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。