Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

R042: Describe an abnormal contract detail (address, phone number) #88

Open
jpmckinney opened this issue Oct 24, 2023 · 9 comments
Open

Comments

@jpmckinney
Copy link
Member

Needed to calculate indicator.

@Camilamila
Copy link

For this we can check the phone, or address. I dont think Ecuador has an specific address format.

@jpmckinney
Copy link
Member Author

Aha, but what makes a phone number (or address) "abnormal" in Ecuador?

The notebook just suggests: len(parties/contactPoint/telephone) ≠ len(validtelephone)

@jpmckinney
Copy link
Member Author

@Camilamila Please see my question above.

@Camilamila
Copy link

For address, I asked SERCOP to verify the address field in the BI, however it seems there is no standard way of writing addresses, so we might not be able to use this. For phone numbers, in Ecuador phone numbers have 8 digits if it is a land line and 9 digits if its a mobile. If it starts with 9 is a mobile number. The international area code is 593. So the rule could be:
if (parties/contactPoint/telephone) starts_with 9 & len(parties/contactPoint/telephone) = 9 then valid phone
if (parties/contactPoint/telephone) starts_with between 2 and 7 & len(parties/contactPoint/telephone) = 8 then valid phone
if (parties/contactPoint/telephone) starts_with 5939 & len(parties/contactPoint/telephone) = 12 then valid phone
if (parties/contactPoint/telephone) starts_with 593(2-7) & len(parties/contactPoint/telephone) = 11 then valid phone
else abnormal phone

@jpmckinney jpmckinney assigned yolile and unassigned Camilamila Jan 30, 2024
@jpmckinney
Copy link
Member Author

Thanks - assigning @yolile as another option for a first indicator (besides open-contracting/bi.open-contracting.org#121).

@jpmckinney jpmckinney self-assigned this Jan 30, 2024
@yolile
Copy link
Member

yolile commented May 13, 2024

@jpmckinney How generic do we want the rules configuration to be?

@jpmckinney
Copy link
Member Author

jpmckinney commented May 13, 2024

Probably add the regex crate and allow regex configuration e.g.

[R042]
telephone = ^((593)?([2-7]|9\d)\d{7})$

And we would pre-process by removing non-number characters. (I think there are optional zeroes in some countries at least – not sure if there's a consistent rule for removing those, or if we need to add that to the regex.)

Another (more robust) option is to use https://github.com/whisperfish/rust-phonenumber (Python version is used in Pelican backend). In that case we only configure with the allowed prefixes as a comma-separated list, and we'd need some logic to try each prefix if the number doesn't include the prefix (though correct OCDS should).

That said, does EC even have telephone numbers? When I checked last year, they did not have telephone or faxNumber fields: https://docs.google.com/spreadsheets/d/16Xud96U38Nf3Pz-nyaaZcvNe6_IyqjVAcsRmI81tuLk/edit#gid=1052318632

@yolile
Copy link
Member

yolile commented May 13, 2024

That said, does EC even have telephone numbers?

Ah, you are right, they don't!

@jpmckinney
Copy link
Member Author

Okay, I'm removing this from the EC milestone, as we have no phone numbers, and no methodology for addresses.

@jpmckinney jpmckinney changed the title R042: Describe an abnormal contract detail (address, phone number) for Ecuador R042: Describe an abnormal contract detail (address, phone number) May 15, 2024
@jpmckinney jpmckinney transferred this issue from open-contracting/bi.open-contracting.org May 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants