|
693 | 693 | " system_prompt=SYSTEM_PROMPT,\n", |
694 | 694 | " model_alias=MODEL_ALIAS,\n", |
695 | 695 | " prompt=(\n", |
696 | | - " \"{% if documentation_style == 'Formal and Technical' %}\"\n", |
697 | | - " \"Write formal and technical medical observations for participant {{ participant_first_name }} {{ participant_last_name }}\"\n", |
698 | | - " \"(ID: {{ participant_id }}) in the clinical trial for {{ therapeutic_area }} (Study ID: {{ study_id }}).\"\n", |
| 696 | + " \"{% if documentation_style == 'Formal and Technical' %}\\n\"\n", |
| 697 | + " \"Write formal and technical medical observations for participant {{ participant_first_name }} {{ participant_last_name }}\\n\"\n", |
| 698 | + " \"(ID: {{ participant_id }}) in the clinical trial for {{ therapeutic_area }} (Study ID: {{ study_id }}).\\n\"\n", |
699 | 699 | "\n", |
700 | | - " \"Include observations related to their enrollment in the {{ dose_level }} dose group with {{ dose_frequency }} administration.\"\n", |
| 700 | + " \"Include observations related to their enrollment in the {{ dose_level }} dose group with {{ dose_frequency }} administration.\\n\"\n", |
701 | 701 | " \"Baseline measurement was {{ baseline_measurement }} and final measurement was {{ final_measurement }}, representing a\"\n", |
702 | | - " \"change of {{ percent_change }}%.\"\n", |
| 702 | + " \"change of {{ percent_change }}%.\\n\"\n", |
703 | 703 | "\n", |
704 | 704 | " \"Use proper medical terminology, maintain a highly formal tone, and structure the notes in a technical format with appropriate\"\n", |
705 | | - " \"sections and subsections. Include at least one reference to the site investigator, Dr. {{ investigator_last_name }}.\"\n", |
| 705 | + " \"sections and subsections. Include at least one reference to the site investigator, Dr. {{ investigator_last_name }}.\\n\"\n", |
706 | 706 | " \"{% elif documentation_style == 'Concise and Direct' %}\"\n", |
707 | | - " \"Write brief, direct medical observations for patient {{ participant_first_name }} {{ participant_last_name }}\"\n", |
708 | | - " \"({{ participant_id }}) in {{ therapeutic_area }} trial {{ study_id }}.\"\n", |
| 707 | + " \"Write brief, direct medical observations for patient {{ participant_first_name }} {{ participant_last_name }}\\n\"\n", |
| 708 | + " \"({{ participant_id }}) in {{ therapeutic_area }} trial {{ study_id }}.\\n\"\n", |
709 | 709 | "\n", |
710 | | - " \"Note: {{ dose_level }} dose, {{ dose_frequency }}. Baseline: {{ baseline_measurement }}. Final: {{ final_measurement }}.\"\n", |
711 | | - " \"Change: {{ percent_change }}%.\"\n", |
| 710 | + " \"Note: {{ dose_level }} dose, {{ dose_frequency }}. Baseline: {{ baseline_measurement }}. Final: {{ final_measurement }}.\\n\"\n", |
| 711 | + " \"Change: {{ percent_change }}%.\\n\"\n", |
712 | 712 | "\n", |
713 | | - " \"Keep notes extremely concise, using abbreviations where appropriate. Mention follow-up needs and reference\"\n", |
714 | | - " \"Dr. {{ investigator_last_name }} briefly.\"\n", |
715 | | - " \"{% else %}\"\n", |
716 | | - " \"Write detailed and descriptive medical observations for participant {{ participant_first_name }} {{ participant_last_name }}\"\n", |
717 | | - " \"enrolled in the {{ therapeutic_area }} clinical trial ({{ study_id }}).\"\n", |
| 713 | + " \"Keep notes extremely concise, using abbreviations where appropriate. Mention follow-up needs and reference\\n\"\n", |
| 714 | + " \"Dr. {{ investigator_last_name }} briefly.\\n\"\n", |
| 715 | + " \"{% else %}\\n\"\n", |
| 716 | + " \"Write detailed and descriptive medical observations for participant {{ participant_first_name }} {{ participant_last_name }}\\n\"\n", |
| 717 | + " \"enrolled in the {{ therapeutic_area }} clinical trial ({{ study_id }}).\\n\"\n", |
718 | 718 | "\n", |
719 | | - " \"Provide a narrative description of their experience in the {{ dose_level }} dose group with {{ dose_frequency }} dosing.\"\n", |
720 | | - " \"Describe how their measurements changed from baseline ({{ baseline_measurement }}) to final ({{ final_measurement }}),\"\n", |
721 | | - " \"representing a {{ percent_change }}% change.\"\n", |
| 719 | + " \"Provide a narrative description of their experience in the {{ dose_level }} dose group with {{ dose_frequency }} dosing.\\n\"\n", |
| 720 | + " \"Describe how their measurements changed from baseline ({{ baseline_measurement }}) to final ({{ final_measurement }}),\\n\"\n", |
| 721 | + " \"representing a {{ percent_change }}% change.\\n\"\n", |
722 | 722 | "\n", |
723 | | - " \"Use a mix of technical terms and explanatory language. Include thorough descriptions of observed effects and subjective\"\n", |
724 | | - " \"patient reports. Mention interactions with the investigator, Dr. {{ investigator_first_name }} {{ investigator_last_name }}.\"\n", |
| 723 | + " \"Use a mix of technical terms and explanatory language. Include thorough descriptions of observed effects and subjective \"\n", |
| 724 | + " \"patient reports. Mention interactions with the investigator, Dr. {{ investigator_first_name }} {{ investigator_last_name }}.\\n\"\n", |
725 | 725 | " \"{% endif %}\"\n", |
726 | 726 | " )\n", |
727 | 727 | " )\n", |
|
735 | 735 | " model_alias=MODEL_ALIAS,\n", |
736 | 736 | " prompt=(\n", |
737 | 737 | " \"{% if has_adverse_event == 1 %}\"\n", |
738 | | - " \"[INSTRUCTIONS: Write a brief clinical description (1-2 sentences only) of the adverse event.\\\n", |
739 | | - " Use formal medical language. Do not include meta-commentary or explain what you're doing.]\\\n", |
740 | | - " {{adverse_event_type}}, {{adverse_event_severity}}. {{adverse_event_relatedness}} to study treatment.\"\n", |
741 | | - " \"{% if adverse_event_resolved == 'Yes' %}Resolved.{% else %}Ongoing.{% endif %}\"\n", |
742 | | - " \"{% else %}\"\n", |
743 | | - " \"[INSTRUCTIONS: Output only the exact text 'No adverse events reported' without any additional commentary.]\\\n", |
744 | | - " No adverse events reported.\"\n", |
| 738 | + " \"[INSTRUCTIONS: Write a brief clinical description (1-2 sentences only) of the adverse event. \"\n", |
| 739 | + " \"Use formal medical language. Do not include meta-commentary or explain what you're doing.] \"\n", |
| 740 | + " \"{{adverse_event_type}}, {{adverse_event_severity}}. {{adverse_event_relatedness}} to study treatment.\\n\"\n", |
| 741 | + " \"{% if adverse_event_resolved == 'Yes' %}Resolved.{% else %}Ongoing.{% endif %}\\n\"\n", |
| 742 | + " \"{% else %}\\n\"\n", |
| 743 | + " \"[INSTRUCTIONS: Output only the exact text 'No adverse events reported' without any additional commentary.] \"\n", |
| 744 | + " \"No adverse events reported.\\n\"\n", |
745 | 745 | " \"{% endif %}\"\n", |
746 | 746 | " )\n", |
747 | 747 | " )\n", |
|
756 | 756 | " prompt=(\n", |
757 | 757 | " \"{% if compliance_rate < 0.85 %}\"\n", |
758 | 758 | " \"{% if documentation_style == 'Formal and Technical' %}\"\n", |
759 | | - " \"[FORMAT INSTRUCTIONS: Write in a direct documentation style. Do not use phrases like 'it looks like' or \\\n", |
760 | | - " 'you've provided'. Begin with the protocol deviation details. Use formal terminology.]\"\n", |
761 | | - "\n", |
762 | | - " \"PROTOCOL DEVIATION REPORT\"\n", |
763 | | - " \"Study ID: {{ study_id }}\"\n", |
764 | | - " \"Participant: {{ participant_first_name }} {{ participant_last_name }} ({{ participant_id }})\"\n", |
765 | | - " \"Compliance Rate: {{ compliance_rate }}\"\n", |
766 | | - "\n", |
767 | | - " \"[Continue with formal description of the deviation, impact on data integrity, and corrective actions. \\\n", |
768 | | - " Reference coordinator {{ coordinator_first_name }} {{ coordinator_last_name }} and Dr. {{ investigator_last_name }}]\"\n", |
769 | | - " \"{% elif documentation_style == 'Concise and Direct' %}\"\n", |
770 | | - " \"[FORMAT INSTRUCTIONS: Use only brief notes and bullet points. No introductions or explanations.]\"\n", |
771 | | - "\n", |
772 | | - " \"PROTOCOL DEVIATION - {{ participant_id }}\"\n", |
773 | | - " \"• Compliance: {{ compliance_rate }}\"\n", |
774 | | - " \"• Impact: [severity level]\"\n", |
775 | | - " \"• Actions: [list actions]\"\n", |
776 | | - " \"• Coordinator: {{ coordinator_first_name }} {{ coordinator_last_name }}\"\n", |
777 | | - " \"• PI: Dr. {{ investigator_last_name }}\"\n", |
778 | | - " \"{% else %}\"\n", |
779 | | - " \"[FORMAT INSTRUCTIONS: Write a narrative description. Begin directly with the deviation details. No meta-commentary.]\"\n", |
780 | | - "\n", |
781 | | - " \"During the {{ therapeutic_area }} study at {{ site_location }}, participant {{ participant_first_name }} \\\n", |
782 | | - " {{ participant_last_name }} demonstrated a compliance rate of {{ compliance_rate }}, which constitutes a protocol deviation.\"\n", |
783 | | - "\n", |
784 | | - " \"[Continue with narrative about circumstances, discovery, impact, and team response. Include references to \\\n", |
785 | | - " {{ coordinator_first_name }} {{ coordinator_last_name }} and Dr. {{ investigator_first_name }} {{ investigator_last_name }}]\"\n", |
786 | | - " \"{% endif %}\"\n", |
787 | | - " \"{% else %}\"\n", |
788 | | - " \"[FORMAT INSTRUCTIONS: Write a simple direct statement. No meta-commentary or explanation.]\"\n", |
789 | | - "\n", |
790 | | - " \"PROTOCOL COMPLIANCE ASSESSMENT\"\n", |
791 | | - " \"Participant: {{ participant_first_name }} {{ participant_last_name }} ({{ participant_id }})\"\n", |
792 | | - " \"Finding: No protocol deviations. Compliance rate: {{ compliance_rate }}.\"\n", |
| 759 | + " \"[FORMAT INSTRUCTIONS: Write in a direct documentation style. Do not use phrases like 'it looks like' or \"\n", |
| 760 | + " \"'you've provided'. Begin with the protocol deviation details. Use formal terminology.]\\n\"\n", |
| 761 | + "\n", |
| 762 | + " \"PROTOCOL DEVIATION REPORT\\n\"\n", |
| 763 | + " \"Study ID: {{ study_id }}\\n\"\n", |
| 764 | + " \"Participant: {{ participant_first_name }} {{ participant_last_name }} ({{ participant_id }})\\n\"\n", |
| 765 | + " \"Compliance Rate: {{ compliance_rate }}\\n\"\n", |
| 766 | + "\n", |
| 767 | + " \"[Continue with formal description of the deviation, impact on data integrity, and corrective actions. \"\n", |
| 768 | + " \"Reference coordinator {{ coordinator_first_name }} {{ coordinator_last_name }} and Dr. {{ investigator_last_name }}]\\n\"\n", |
| 769 | + " \"{% elif documentation_style == 'Concise and Direct' %}\\n\"\n", |
| 770 | + " \"[FORMAT INSTRUCTIONS: Use only brief notes and bullet points. No introductions or explanations.]\\n\"\n", |
| 771 | + "\n", |
| 772 | + " \"PROTOCOL DEVIATION - {{ participant_id }}\\n\"\n", |
| 773 | + " \"• Compliance: {{ compliance_rate }}\\n\"\n", |
| 774 | + " \"• Impact: [severity level]\\n\"\n", |
| 775 | + " \"• Actions: [list actions]\\n\"\n", |
| 776 | + " \"• Coordinator: {{ coordinator_first_name }} {{ coordinator_last_name }}\\n\"\n", |
| 777 | + " \"• PI: Dr. {{ investigator_last_name }}\\n\"\n", |
| 778 | + " \"{% else %}\\n\"\n", |
| 779 | + " \"[FORMAT INSTRUCTIONS: Write a narrative description. Begin directly with the deviation details. No meta-commentary.]\\n\"\n", |
| 780 | + "\n", |
| 781 | + " \"During the {{ therapeutic_area }} study at {{ site_location }}, participant {{ participant_first_name }} \"\n", |
| 782 | + " \"{{ participant_last_name }} demonstrated a compliance rate of {{ compliance_rate }}, which constitutes a protocol deviation.\\n\"\n", |
| 783 | + "\n", |
| 784 | + " \"[Continue with narrative about circumstances, discovery, impact, and team response. Include references to \"\n", |
| 785 | + " \"{{ coordinator_first_name }} {{ coordinator_last_name }} and Dr. {{ investigator_first_name }} {{ investigator_last_name }}]\\n\"\n", |
| 786 | + " \"{% endif %}]\\n\"\n", |
| 787 | + " \"{% else %}\\n\"\n", |
| 788 | + " \"[FORMAT INSTRUCTIONS: Write a simple direct statement. No meta-commentary or explanation.]\\n\"\n", |
| 789 | + "\n", |
| 790 | + " \"PROTOCOL COMPLIANCE ASSESSMENT\\n\"\n", |
| 791 | + " \"Participant: {{ participant_first_name }} {{ participant_last_name }} ({{ participant_id }})\\n\"\n", |
| 792 | + " \"Finding: No protocol deviations. Compliance rate: {{ compliance_rate }}.\\n\"\n", |
793 | 793 | " \"{% endif %}\"\n", |
794 | 794 | " )\n", |
795 | 795 | " )\n", |
|
1015 | 1015 | "job_results.download_artifacts(\n", |
1016 | 1016 | " output_path=TUTORIAL_OUTPUT_PATH,\n", |
1017 | 1017 | " artifacts_folder_name=\"artifacts-community-contributions-healthcare-datasets-clinical-trials\",\n", |
1018 | | - ")" |
| 1018 | + ");" |
1019 | 1019 | ] |
1020 | 1020 | } |
1021 | 1021 | ], |
|
0 commit comments