Dates and Phone Numbers

sunsetsystems wrote on Monday, June 20, 2005:

I checked in library/textformat.js which adds client-side assistance in the correct entry of dates and phone numbers.  This is a good place to add other JavaScript functions related to user input.

Also I’ve updated interface/patient_file/summary/demographics_full.php to use this.  Please refer to this module for example code if you are working with user input of dates or phone numbers.

Phone numbers are now a single text input field for each instead of three.  This should help to speed up data entry.  International phone numbers (starting with + and country code) are now also permitted.  Dates are converted at entry time to yyyy-mm-dd format.

I’ve also checked in some other modules in support of team sports medicine, and will be doing more of the same over the next week or two.

– Rod <rod at sunsetsystems dot com>

drroller wrote on Friday, June 24, 2005:

This is fantastic!

I know one place where the improper phone number format left the X12 file without a clinic phone number.

sunsetsystems wrote on Friday, June 24, 2005:

Thank you for mentioning that.  The code that extracts phone numbers for FreeB is extremely and needlessly picky about the format - if it’s not precisely “(xxx) xxx-xxxx” then it does not work.

I’ll fix it.

– Rod <rod at sunsetsystems dot com>

tekknogenius wrote on Friday, June 24, 2005:

Yep. I’ll have to find a couple of js scripts for zip-code entry. Also, the states should be implemented as a list of two-digit codes since that is what x12 is looking for.

blankev wrote on Sunday, October 14, 2012:

Rod,

I found this old entry in Forum for Developer on PHONE NUMBERS. Since X12 is very picky about the phone numbers I suppose this WILL not be changed in phone numbers for Pharmacies, Insurances and X12 entries.

But the User-addressbook (Administration => Addr Book has no control on input. Even abcdefg……-characters can be used.

This makes the input of phone numbers kind of a duality. There are two type op phone number input i.e. Administration => User, free phones and Administration => Practice phone numbers, strickt numberswith or without dashes, but with obligation to make in input with area code.

What can be a solution to make the right entry before struggling with many options of input? Would a default number be an option? Or just a plain texts, following the phone number field as an example, just for Pharmacies, Insurances and X12?

Please advise,

Tnx in advance, Pimm

sunsetsystems wrote on Sunday, October 14, 2012:

Hi Pimm, yes the address book treats phone numbers as just free text.  I guess that’s because no other part of the system cares what’s there, and some users might want to put in additional information such as an extension/name/hours/etc.  Unless there’s some pressing need, I wouldn’t worry about it yet since some others have been talking about changing the way phone numbers and some other things are stored.

Rod
www.sunsetsystems.com

blankev wrote on Sunday, October 14, 2012:

Rod,

I was used to do phone numbers for USERS and Patients in FREE STYLE, and than suddenly could not make phone numbers for Pharmacy and Insurance to work. After a while I got a brainwave and did some  digging in Forums and found the solution of area code and - in-be-tween. For me there is no urgency whatsoever, but for the next generations OpenEMR users this might give the same problem as I encountered. (Not reading the manual could have caused it., but also a slightly different way of phone numbers notation Dutch oriented phone numbers in Curacao)

Can you explain (give a hint) how I can change the hard-coded (+1) in Pharmacy etc. to make the connection with the Global phone_country_code? For a programmer probably done in a wink, for me as a non programmer a real effort, I do want to undertake as a non-programmer. Putting the text  000-000-0000 (like Facility phone info) just next to the input fields in Pharmacy is a project I should be able to handle. (No need for information on that)

First learn to do the right things in GitHub for Windows.

Tnx for the info.

Pimm

blankev wrote on Sunday, October 14, 2012:

I Meant to say: “I have to learn first GitHub…….”, so no offence intended

blankev wrote on Sunday, October 14, 2012:

In WIKI-manual I made some reference to this phone-numbers discussion. Please read it and feel free to give comments and for future releases please remember me to make changes aqgain as soon as this issue on phone-numbers has been changed.

Pimm

sunsetsystems wrote on Monday, October 15, 2012:

Hi Pimm, I’m not sure what you’re asking but suggest you look at these:

library/classes/PhoneNumber.class.php
library/classes/Pharmacy.class.php
controllers/C_Pharmacy.class.php

Rod
www.sunsetsystems.com