# Pub\_id question

**URL:** <https://community.open-emr.org/t/pub-id-question/1444>\
**Category:** Management and Administration\
**Created:** [February 21, 2008, 2:47pm UTC](https://community.open-emr.org/t/pub-id-question/1444 "2008-02-21T14:47:51Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://discourse-uploads-openemr.s3.dualstack.us-east-1.amazonaws.com/original/2X/b/bb9e4e8ae2ea7faac2e952fd9e38a3ce03aac403.png) [@system](https://community.open-emr.org/u/system)\
**Post date:** [February 21, 2008, 2:47pm UTC](https://community.open-emr.org/t/pub-id-question/1444/1 "2008-02-21T14:47:51Z")

</div>

**[mike-h30](https://sourceforge.net/u/mike-h30/)** wrote on [Thursday, February 21, 2008](https://sourceforge.net/p/openemr/discussion/202505/thread/8e2d55d9/#e2ee):

I recently had our front desk personal start entering the patient’s insurance number in the number field (for the “pub\_id”) of the demographics page.&nbsp; The reason is because some of our patients are Workers Comp and have multiple claims.&nbsp; When browsing for a patient from the search screen, it was difficult to differentiate the claims per patient based on the “pid” displayed,&nbsp; When I imported our patient data from our Access DB, I imported patient ID into “pid”, “pub\_id” and “id” of table “patient\_data”.&nbsp; I do not foresee a problem with entering the insurance number for “pub\_id” so as long as I maintain the original “pid”.&nbsp; Would others agree?

Thanks.

-Mike

---

<div class="post-metadata">

**Author:** ![system](https://discourse-uploads-openemr.s3.dualstack.us-east-1.amazonaws.com/original/2X/b/bb9e4e8ae2ea7faac2e952fd9e38a3ce03aac403.png) [@system](https://community.open-emr.org/u/system)\
**Post date:** [February 21, 2008, 3:10pm UTC](https://community.open-emr.org/t/pub-id-question/1444/2 "2008-02-21T15:10:19Z")

</div>

**[sunsetsystems](https://sourceforge.net/u/sunsetsystems/)** wrote on [Thursday, February 21, 2008](https://sourceforge.net/p/openemr/discussion/202505/thread/8e2d55d9/#e2ee/706d):

Do you mean that you have the same patients entered multiple times into demographics?&nbsp; If so, why?

To answer your question, it should be OK to put whatever you want into the "pubpid" field.

Rod  
[www.sunsetsystems.com](http://www.sunsetsystems.com)

---

<div class="post-metadata">

**Author:** ![system](https://discourse-uploads-openemr.s3.dualstack.us-east-1.amazonaws.com/original/2X/b/bb9e4e8ae2ea7faac2e952fd9e38a3ce03aac403.png) [@system](https://community.open-emr.org/u/system)\
**Post date:** [February 21, 2008, 4:31pm UTC](https://community.open-emr.org/t/pub-id-question/1444/3 "2008-02-21T16:31:36Z")

</div>

**[mike-h30](https://sourceforge.net/u/mike-h30/)** wrote on [Thursday, February 21, 2008](https://sourceforge.net/p/openemr/discussion/202505/thread/8e2d55d9/#e2ee/1316):

Yes, we have patients entered multiple times in demographics. We have Workers’ Compensation patients in our office.&nbsp; Only a few are entered multiple times though.&nbsp; In our old Access DB program, the only way to schedule or keep records for the patient with multiple Workers’ Compensation claims was to treat each claim as a separate patient. Otherwise, it was not known which claim the patient was in the office seeking treatment for that day.&nbsp; I imported the patient demographics from our Access system into OpenEMR and was careful to retain the patient\_id’s.

For example, Patient Mike Test is a Workers Compensation patient with 3 different injuries ( claims ).&nbsp; He hurt his shoulder, neck, and hand. So he would have patient ID 1001, 1002, and 1003.&nbsp; Workers’ Comp patients are not allowed to come in for a doctor’s visit for all 3 claims on one day. Has to be separate days ( mandated by the BWC in the state).&nbsp; So only one follow up visit per claim on a single day.&nbsp; The BWC will only pay for one follow up visit per day regardless of the number of claims.&nbsp; If the patient was seen for all three claims in one day, we only get reimbursed for one visit.

So when searching for a patient in OpenEMR, Mike Test would display with ID’s 1001, 1002, 1003.&nbsp; Unless you drill down, it is not easy to know that ID 1001 is for his shoulder claim and ID 1002 is for his neck claim and so forth.&nbsp; That is the reason I thought placing the insurance number( in this case the BWC claim number) in pub\_id would make it easier to differentiate the different claims.&nbsp; Is there a better way?

Thanks.

-Mike

---

<div class="post-metadata">

**Author:** ![system](https://discourse-uploads-openemr.s3.dualstack.us-east-1.amazonaws.com/original/2X/b/bb9e4e8ae2ea7faac2e952fd9e38a3ce03aac403.png) [@system](https://community.open-emr.org/u/system)\
**Post date:** [February 21, 2008, 7:33pm UTC](https://community.open-emr.org/t/pub-id-question/1444/4 "2008-02-21T19:33:37Z")

</div>

**[sunsetsystems](https://sourceforge.net/u/sunsetsystems/)** wrote on [Thursday, February 21, 2008](https://sourceforge.net/p/openemr/discussion/202505/thread/8e2d55d9/#e2ee/706f):

I guess you can do what you’re doing, but in general I think things will work better if you have only one demographics entry per patient.&nbsp; That’s how it was designed to work, anyway.

You might find it useful to create a separate "issue" for each WC claim.&nbsp; Issues are normally conditions, illnesses or injuries that might be associated with multiple visits.&nbsp; You could put the claim number in the issue title.

Of course there’s nothing currently in OpenEMR to enforce your one-claim-per-day rule.

Rod  
[www.sunsetsystems.com](http://www.sunsetsystems.com)

---

<div class="post-metadata">

**Author:** ![system](https://discourse-uploads-openemr.s3.dualstack.us-east-1.amazonaws.com/original/2X/b/bb9e4e8ae2ea7faac2e952fd9e38a3ce03aac403.png) [@system](https://community.open-emr.org/u/system)\
**Post date:** [February 21, 2008, 7:47pm UTC](https://community.open-emr.org/t/pub-id-question/1444/5 "2008-02-21T19:47:39Z")

</div>

**[mike-h30](https://sourceforge.net/u/mike-h30/)** wrote on [Thursday, February 21, 2008](https://sourceforge.net/p/openemr/discussion/202505/thread/8e2d55d9/#e2ee/e5b7):

I fully agree with you Rod.&nbsp; I was not thrilled about having multiple entries in demographics per patient.&nbsp; That was the only way to get it to work with the old system.&nbsp; I prefer to avoid redundancy all together.&nbsp; I will explore your suggestions.&nbsp; Thanks for your input on the topic.

By the way, I do need to put that BWC number on the prescription.&nbsp; The pharmacists will call if it is not on there.&nbsp; I have been looking at the code but have not seen where I can swap out "pid" for "pub\_id" for the code that creates the patient PDF prescription.&nbsp; I have searched through the patient\_file directory and library classes associated with prescription.&nbsp; Thanks.

-Mike

---

<div class="post-metadata">

**Author:** ![system](https://discourse-uploads-openemr.s3.dualstack.us-east-1.amazonaws.com/original/2X/b/bb9e4e8ae2ea7faac2e952fd9e38a3ce03aac403.png) [@system](https://community.open-emr.org/u/system)\
**Post date:** [February 21, 2008, 8:43pm UTC](https://community.open-emr.org/t/pub-id-question/1444/6 "2008-02-21T20:43:21Z")

</div>

**[sunsetsystems](https://sourceforge.net/u/sunsetsystems/)** wrote on [Thursday, February 21, 2008](https://sourceforge.net/p/openemr/discussion/202505/thread/8e2d55d9/#e2ee/4a80):

Try controllers/C\_Prescription.class.php and templates/prescription/\*.

Rod  
[www.sunsetsystems.com](http://www.sunsetsystems.com)

---

<div class="post-metadata">

**Author:** ![system](https://discourse-uploads-openemr.s3.dualstack.us-east-1.amazonaws.com/original/2X/b/bb9e4e8ae2ea7faac2e952fd9e38a3ce03aac403.png) [@system](https://community.open-emr.org/u/system)\
**Post date:** [February 29, 2008, 3:51am UTC](https://community.open-emr.org/t/pub-id-question/1444/7 "2008-02-29T03:51:21Z")

</div>

**[mike-h30](https://sourceforge.net/u/mike-h30/)** wrote on [Friday, February 29, 2008](https://sourceforge.net/p/openemr/discussion/202505/thread/8e2d55d9/#e2ee/c448):

Rod,

I thoroughly perused the following directories looking to see where I could swap out "pid" with "pub\_id" for prescription output.

controllers/C\_Prescription.class.php  
templates/prescription/\*.  
includes/config.php  
librarary/classes/\*  
interface/patient\_file/\*

I did not see the code that generates the data for the PDF prescription output.&nbsp; The pharmacies are requesting the BWC number to be on the prescription for our workers compensation patients.&nbsp; I began populating “pub\_id” with the patient’s BWC number so this could be displayed on the patient search output.&nbsp; However, the prescriptions seem to print the “pid”.&nbsp;

Why does the prescription display the "pid" which is usually an internal number for a practice?&nbsp; Why not insurance/policy number?  
Also, is it possible to have the globals.php file include settings for customizing prescription output?

-Mike

---

<div class="post-metadata">

**Author:** ![system](https://discourse-uploads-openemr.s3.dualstack.us-east-1.amazonaws.com/original/2X/b/bb9e4e8ae2ea7faac2e952fd9e38a3ce03aac403.png) [@system](https://community.open-emr.org/u/system)\
**Post date:** [March 3, 2008, 11:38pm UTC](https://community.open-emr.org/t/pub-id-question/1444/8 "2008-03-03T23:38:58Z")

</div>

**[sunsetsystems](https://sourceforge.net/u/sunsetsystems/)** wrote on [Monday, March 03, 2008](https://sourceforge.net/p/openemr/discussion/202505/thread/8e2d55d9/#e2ee/6272):

I don’t remember offhand, would have to do some digging and don’t have the time right now.&nbsp; I guess the pid might be used just to have a unique number.

Rod  
[www.sunsetsystems.com](http://www.sunsetsystems.com)

---

<div class="post-metadata">

**Author:** ![system](https://discourse-uploads-openemr.s3.dualstack.us-east-1.amazonaws.com/original/2X/b/bb9e4e8ae2ea7faac2e952fd9e38a3ce03aac403.png) [@system](https://community.open-emr.org/u/system)\
**Post date:** [March 4, 2008, 12:08am UTC](https://community.open-emr.org/t/pub-id-question/1444/9 "2008-03-04T00:08:32Z")

</div>

**[drbowen](https://sourceforge.net/u/drbowen/)** wrote on [Tuesday, March 04, 2008](https://sourceforge.net/p/openemr/discussion/202505/thread/8e2d55d9/#e2ee/de32):

The "pub\_id" was intended to keep track of the patient chart number.&nbsp; The pid is the actual computer unique ID number for a given patient.&nbsp; This "pub\_id" does not have to be unique and was intended to assist practices transitioning from paper charts to electronic charts.&nbsp; I have tried to keep the pub\_id = pid but in practice this is quite difficult.

It seems that the prescription generating code should be using "pub\_id" since it reflects the patients "paper chart number".

It would be nice to be able search by either pub\_id or pid.&nbsp; It is actually easier to identify the pid than the pub\_id but the find function only looks for pud\_id.

Sam Bowen, MD

---

<div class="post-metadata">

**Author:** ![system](https://discourse-uploads-openemr.s3.dualstack.us-east-1.amazonaws.com/original/2X/b/bb9e4e8ae2ea7faac2e952fd9e38a3ce03aac403.png) [@system](https://community.open-emr.org/u/system)\
**Post date:** [March 4, 2008, 4:33am UTC](https://community.open-emr.org/t/pub-id-question/1444/10 "2008-03-04T04:33:58Z")

</div>

**[mike-h30](https://sourceforge.net/u/mike-h30/)** wrote on [Tuesday, March 04, 2008](https://sourceforge.net/p/openemr/discussion/202505/thread/8e2d55d9/#e2ee/03de):

Sam,

Thanks for your input.&nbsp; Yes, I thought for sure that the prescription code would generate the pub\_id number and was surprised that was not the case.&nbsp; Currently we are having our admin write the patient’s claim number on the script until I resolve the issue.&nbsp;

-Mike

---

<div class="post-metadata">

**Author:** ![system](https://discourse-uploads-openemr.s3.dualstack.us-east-1.amazonaws.com/original/2X/b/bb9e4e8ae2ea7faac2e952fd9e38a3ce03aac403.png) [@system](https://community.open-emr.org/u/system)\
**Post date:** [March 4, 2008, 2:54pm UTC](https://community.open-emr.org/t/pub-id-question/1444/11 "2008-03-04T14:54:29Z")

</div>

**[drbowen](https://sourceforge.net/u/drbowen/)** wrote on [Tuesday, March 04, 2008](https://sourceforge.net/p/openemr/discussion/202505/thread/8e2d55d9/#e2ee/7e14):

From the developer’s perspective the pid is the unique identifier so it is necessary for inclusion.&nbsp; The only place that I know of that takes the pub\_id is the find function.&nbsp; They just tend not to think about it.

I like the idea of being able to customize what goes on the prescriptions.

Sam Bowen

> **[OEMR](https://www.oemr.org/)**
>
> OEMR is a non-profit organization that supports the OpenEMR project.
