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
Model Accessors/Properties #27
Comments
I wonder if we don't need a lower-level accessor, like:
We could use this to ask for, for example, the "NM1" "IL" segment dict and easily access the values we need. |
That's a great point @ccorley! We may need to add the "loop_name" to the signature (we have enumerations for these) as there could be multiple segments of the same name in the transaction set. We may still need to support a return type of |
Met with @ccorley to discuss the initial implementation. We will provide accessors for each high level loop with an additional parameter to indicate if we want the first result. This will default to "true" (in 7 years at PokitDok I never saw a multiple record eligibility transaction). Additionally we are currently storing the x12 delimiters with each segment. This will lead to a bit of duplicative effort to exclude the delimiters from a pydantic export via |
X12 transaction models can be cumbersome to navigate due to the nested and hierarchical nature of some of the transaction sets such as eligibility and claim status. Let's make things a bit easier by adding "accessor" methods for the entities in the transaction set. An entity is a record which is comprised of one or more loops.
For example in the Eligibility Inquiry model (270) we could add a subscriber property:
The
return_first
parameter will default to True for each implementation. The majority of x12 transactions convey data for a single member rather than batch. The one notable exception is the 834 (Benefit Enrollment) format.Finally, adding properties to the transaction set models provides a greater and simpler DX experience.
The text was updated successfully, but these errors were encountered: