-
Notifications
You must be signed in to change notification settings - Fork 112
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(exports): interpret PN tags as union between object and string (#364
) * chore: format codebase yarn run format * fix(exports): interpret PN tags as union between object and string the JSON standard represents PeopleNames as an object, rather than a delineated string. this caused SRs derived from metadata to have [object Object] for the patient name, notable in Google's Healthcare dicom store, which seems to pick a random patient name when searching for series. much of the change is attempting to communicate this union somewhat opaquely, and ensuring objects with additional properties aren't destroyed when being naturalized. tested with OHIF master branch. * fix(exports): add SR to test PN tags Since the sample dcm has image data in it, and we don't support serializing InlineBinary, I've added a simple SR derived from a TCIA frame for testing. Adds test for equality between the SR dcm and the same SR recreated from the json equivalent. * refactor: 💡 move PersonName code into functions for easier testing and cleanliness * feat: 🎸 add value multiplicity to PersonName tags And also adds the concept of tag and value accessors to ValueRepresentation. Whenever a tag is created, it is assigned to a Proxy which allows values to be represented differently according to whether it's being output to JSON or being interacted with. This allows a user to assign a string to a PN tag, and have that tag be output as a JSON object conformant to spec. * test: 💍 separate PersonName multiplicity test * refactor: 💡 make proxy handler static, update comments
- Loading branch information
Showing
32 changed files
with
3,600 additions
and
587 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.