Skip to content

parse state values #202

@ericbuckley

Description

@ericbuckley

Summary

Update the Address class to parse state values as data comes in. Data should be normalized into standard USPS two letter alphabetic codes, this includes states, possessions and military codes. If a state can not be accurately parsed, a validation error should be raised.

Acceptance Criteria

  • A new parse_state method on the Address class
  • Test cases to show that state is correctly parsed
  • Documentation added to site/references to indicate that state is normalized into the two-letter code

Details / Tasks

A valid list of all the two-letter codes can be found here https://www.hl7.org/fhir/us/core/STU4/ValueSet-us-core-usps-state.html.

Background / Context

State is current accepted as raw text, and saved that way for comparisons. In some cases the record might use an abbreviation and in others, the full state name. Ideally, comparisons like "AK" <-> "Alaska", should be a 100% match.

Metadata

Metadata

Assignees

Labels

apiNew API feature
No fields configured for Feature.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions