本文整理汇总了Java中org.oscarehr.common.model.Provider.setProviderNo方法的典型用法代码示例。如果您正苦于以下问题:Java Provider.setProviderNo方法的具体用法?Java Provider.setProviderNo怎么用?Java Provider.setProviderNo使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.oscarehr.common.model.Provider
的用法示例。
在下文中一共展示了Provider.setProviderNo方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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);
}
示例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);
}
示例3: setUpBeforeClass
import org.oscarehr.common.model.Provider; //导入方法依赖的package包/类
@BeforeClass
public static void setUpBeforeClass() {
LoggedInInfo loggedInInfo = LoggedInInfo.getLoggedInInfoAsCurrentClassAndMethod();
Provider provider = new Provider();
provider.setProviderNo("100");
loggedInInfo.setLoggedInProvider( provider );
ticklerHandler = new TicklerHandler( loggedInInfo, new TicklerManager() );
Map<String, Object[]> parameterMap = new HashMap<String, Object[]>();
parameterMap.put("message", new String[]{"This is a message."} );
parameterMap.put("messageAppend", new String[]{"This is an appended message."} );
parameterMap.put("priority", new String[]{"High"} );
parameterMap.put("serviceDate", new String[]{"06-18-2017"} );
parameterMap.put("serviceTime", new String[]{"04:08 PM"});
parameterMap.put("taskAssignedTo", new String[]{"100"} );
parameterMap.put("creator", new String[]{"100"} );
parameterMap.put("ticklerCategoryId", new String[]{"1"} );
ticklerHandler.createMasterTickler( parameterMap );
ticklerHandler.addTickler( json );
}
示例4: makeNewNote
import org.oscarehr.common.model.Provider; //导入方法依赖的package包/类
private CaseManagementNote makeNewNote(String providerNo, String demographicNo, HttpServletRequest request) {
CaseManagementNote note = new CaseManagementNote();
note.setProviderNo(providerNo);
Provider prov = new Provider();
prov.setProviderNo(providerNo);
note.setProvider(prov);
note.setDemographic_no(demographicNo);
if (!OscarProperties.getInstance().isPropertyActive("encounter.empty_new_note")) {
this.insertReason(request, note);
} else {
note.setNote("");
note.setEncounter_type("");
}
String strBeanName = "casemgmt_oscar_bean" + demographicNo;
EctSessionBean bean = (EctSessionBean) request.getSession().getAttribute(strBeanName);
String encType = request.getParameter("encType");
if (encType == null || encType.equals("")) {
note.setEncounter_type("");
} else {
note.setEncounter_type(encType);
}
if (bean.encType != null && bean.encType.length() > 0) {
note.setEncounter_type(bean.encType);
}
return note;
}
示例5: 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;
}
示例6: run
import org.oscarehr.common.model.Provider; //导入方法依赖的package包/类
@Override
public void run() {
if (!OscarProperties.getInstance().getProperty("ORN_PILOT", "no").equalsIgnoreCase("yes")) {
return;
}
Provider provider = new Provider();
provider.setProviderNo(OscarProperties.getInstance().getProperty("ORN_PILOT_USER", "999998"));
Security security = new Security();
security.setId(0);
LoggedInInfo loggedInInfo = new LoggedInInfo();
loggedInInfo.setLoggedInProvider(provider);
loggedInInfo.setLoggedInSecurity(security);
try {
logger.info("starting renal background ckd screening job");
CkdScreener screener = new CkdScreener();
screener.screenPopulation(loggedInInfo);
logger.info("done renal background ckd screening job");
} catch (Exception e) {
logger.error("Error", e);
} finally {
DbConnectionFilter.releaseAllThreadDbResources();
}
}
示例7: 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);
}
示例8: playAround
import org.oscarehr.common.model.Provider; //导入方法依赖的package包/类
@Test
@Ignore
/*
* Just used during my own testing..but thought it be useful to leave for someone else
*/
public void playAround() throws Exception {
String url = "http://localhost:8080/oscar_alberta/lab/newLabUpload.do";
String publicOscarKeyString = OSCAR_KEY;
String publicServiceKeyString = CLIENT_KEY;
PublicKey publicOscarKey = SendingUtils.getPublicOscarKey(publicOscarKeyString);
PrivateKey publicServiceKey = SendingUtils.getPublicServiceKey(publicServiceKeyString);
InputStream is = this.getClass().getResourceAsStream("/labs/HL7-CLS/MillenniumUpgrade2010_Clinic_Validation_Current.hl7");
byte[] bytes = IOUtils.toByteArray(is);
Provider provider = new Provider();
provider.setProviderNo("1");
LoggedInInfo l = new LoggedInInfo();
l.setLoggedInProvider(provider);
int statusCode = SendingUtils.send(l, bytes, url, publicOscarKey, publicServiceKey, "CLS");
logger.info("Completed Labs upload call with status " + statusCode);
assertEquals(200, statusCode);
}
示例9: 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;
}
示例10: 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);
}
}
示例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);
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());
}
示例12: 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);
}
示例13: testGetActiveRAPremiumsByProvider
import org.oscarehr.common.model.Provider; //导入方法依赖的package包/类
@Test
/**
* Ensures that query only returns premiums where
* the paydate is within the given range,
* the status is set to true, and
* the provider numbers match.
*/
public void testGetActiveRAPremiumsByProvider() throws Exception {
Provider provider = new Provider();
provider.setProviderNo("1");
Date startDate = new Date(dfm.parse("20090101").getTime());
Date endDate = new Date(dfm.parse("20120101").getTime());
Locale locale = new Locale(""); // not used in dao method
// On day of lower boundary
// Matching provider number
BillingONPremium billONPrem1 = new BillingONPremium();
EntityDataGenerator.generateTestDataForModelClass(billONPrem1);
Date date1 = new Date(dfm.parse("20090101").getTime());
billONPrem1.setPayDate(date1);
billONPrem1.setProviderNo("1");
billONPrem1.setStatus(true);
// Inside range
// Non-matching provider number
BillingONPremium billONPrem2 = new BillingONPremium();
EntityDataGenerator.generateTestDataForModelClass(billONPrem2);
Date date2 = new Date(dfm.parse("20100601").getTime());
billONPrem2.setPayDate(date2);
billONPrem2.setProviderNo("2");
billONPrem2.setStatus(true);
// Inside range
// Matching provider number
BillingONPremium billONPrem3 = new BillingONPremium();
EntityDataGenerator.generateTestDataForModelClass(billONPrem3);
Date date3 = new Date(dfm.parse("20110101").getTime());
billONPrem3.setPayDate(date3);
billONPrem3.setProviderNo("1");
billONPrem3.setStatus(true);
// Inside range
// Matching provider number
BillingONPremium billONPrem4 = new BillingONPremium();
EntityDataGenerator.generateTestDataForModelClass(billONPrem4);
Date date4 = new Date(dfm.parse("20110601").getTime());
billONPrem4.setPayDate(date4);
billONPrem4.setProviderNo("1");
billONPrem4.setStatus(false);
// On day of upper boundary
// Matching provider number
BillingONPremium billONPrem5 = new BillingONPremium();
EntityDataGenerator.generateTestDataForModelClass(billONPrem5);
Date date5 = new Date(dfm.parse("20120101").getTime());
billONPrem5.setPayDate(date5);
billONPrem5.setProviderNo("1");
billONPrem5.setStatus(true);
dao.persist(billONPrem1);
dao.persist(billONPrem2);
dao.persist(billONPrem3);
dao.persist(billONPrem4);
dao.persist(billONPrem5);
List<BillingONPremium> expectedList = new ArrayList<BillingONPremium>(Arrays.asList(
billONPrem1,
billONPrem3
));
List<BillingONPremium> resultList = dao.getActiveRAPremiumsByProvider(provider, startDate, endDate, locale);
// fail if list sizes aren't the same
if (resultList.size() != expectedList.size()) {
fail("Array sizes do not match.");
}
boolean containsAllItems = resultList.containsAll(expectedList);
assertTrue(containsAllItems);
}
示例14: 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);
}
示例15: 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());
}