Open nonprofittechy opened 2 years ago
To expand on this a little bit;
These paths are a part of the XML that Tyler gives us. It does change with larger changes, like ECF4 to ECF5, but doesn't change otherwise; so any change to this is considered a breaking change, and Tyler's been pretty good about not making breaking changes like that (as that requires changing the SOAP schema, which it can't do without making everyone change their own clients as well).
As a partial solution for ECF5, there are two paths for all of the relevant parts here; a bit messy, but that will need to be the case until https://github.com/SuffolkLITLab/EfileProxyServer/issues/135 is implemented.
I guess this is really an encapsulation and code readability question.
Another option is to move the API for interacting with these case details to the Python layer, so the case_details attribute has the date in an easier to find place, or it's returned as a separate attribute, or we have a function that parses case_details to get the important bits.
Would make the code slightly easier to read. Not urgent though, this is a pure developer experience suggestion.
e.g., https://github.com/SuffolkLITLab/docassemble-EFSPIntegration/blob/5f73cc7505037ba4a3be58f5106dd7482c432841/docassemble/EFSPIntegration/data/questions/case_search.yml#L161 is kind of hard to read and may break with small changes on Tyler's side.
This thread has some ideas: https://stackoverflow.com/questions/7320319/xpath-like-query-for-nested-python-dictionaries