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
Printing support #672
base: master
Are you sure you want to change the base?
Printing support #672
Conversation
@umerkhan-apple @YuanZhu-apple I've pushed some major updates to this PR which now makes the printing functionality working for question steps and form steps (including images). I've also added the possibility of attaching HTML headers and footers to the printed page. One common use case would be the inclusion of an institutional logo. Before I proceed please let me know, what you think about the general design. |
@umerkhan-apple @YuanZhu-apple any news? |
@oliverschaefer @YuanZhu-apple @umerkhan-apple Been watching some of WWDC this week. Really excited about a feature that didn't make either the Keynote of the Platforms speeches - HLA CDA support in HealthKit - and that has led me to rethink Printing support in ResearchKit. Instead of implementing printing support, we could achieve a closely related thing and implement HLA CDAv2 export to HealthKit. This would achieve two goals - firstly it would be a major feature for ResearchKit; it would tightly integrate ResearchKit and HealthKit; it would enable data sharing between ResearchKit and any integration solutions implemented to HealthKit in the future; and it will give us printing support for free. Some of the Printing implementation started here is similar - to create a structured XML document. Some of them are problems we need to think about slightly differently. As an example, for Boolean survey fields, we could add support to return a SNOMED code, or omit a SNOMED code or use a different SNOMED code for the opposite response (embedding the SNOMED codes into the results objects reduces the post-processing). Allowing survey tasks to return whole XML blocks to reduce post-processing of results would be another step towards this. And printing support would then be free and consistent. |
@md0u80c9 Hi Andrew, thanks for your input. This is a great idea, which in my opinion deserves a PR of its own |
@YuanZhu-apple friendly ping :-) |
Thanks oliver: I have been thinking about the implementation for it. I've got a fair idea how to do it tidily enough in Swift through use of some of its protocol features; I must confess in Obj C it feels trickier. I will write up my thoughts so far as a PR shortly. The proposals I've got so far go between ResearchKit and CareKit; I don't know how @YuanZhu-apple and @umerkhan-apple feel regarding how 'hard' or 'soft' the division is between the two projects; to me they naturally should be sharing a lot of code. |
@YuanZhu-apple TODOs done. Added a |
@YuanZhu-apple |
@oliverschaefer Thanks!
Because this is the only piece of code I found relevant to UIPrintFormatter. Propose a new flow:
I am OK to expose ORKHTMLPDFWriter. |
@YuanZhu-apple Let's name it ORKHTMLWriter and rename ORKHTMLPDFWriter to ORKPDFWriter to keep it consistent? I'll do the changes over the weekend and let you know. |
Sounds good! On Fri, Aug 19, 2016 at 3:13 PM, Oliver Schäfer notifications@github.com
|
@YuanZhu-apple Changes done. |
@oliverschaefer Thanks for the update! |
@YuanZhu-apple This was easy buddy. I've added a button to the review step section, that lets you print out all the step results of a completed embedded review task. Happy testing :-) |
@YuanZhu-apple friendly ping |
Merge conflicts need to be resolved. |
This PR adds basic printing support to ResearchKit (#479). To try the functionality run the ORKTest app and hit Learn more on a step of your choice.