mikee6290
09/20/2023, 6:48 PMconst medplum = useMedplum();
const questionnaire = medplum
.searchResources("Questionnaire", "title=Patient Intake Form")
.read();
console.log(questionnaire[0]);
return (
<div>
<Document width={1000}>
<QuestionnaireForm
questionnaire={questionnaire[0]}
onSubmit={(formData: any) => {
console.log("submit", formData);
}}
/>
</Document>
</div>
);rahul1
09/20/2023, 7:12 PMmikee6290
09/20/2023, 7:22 PMmikee6290
09/20/2023, 7:25 PMmikee6290
09/20/2023, 7:26 PMmikee6290
09/21/2023, 5:18 PMrahul1
09/21/2023, 6:42 PMmikee6290
09/21/2023, 6:49 PMrahul1
09/21/2023, 7:41 PMrahul1
09/21/2023, 7:43 PMrahul1
09/21/2023, 7:44 PMmikee6290
09/21/2023, 7:46 PMmikee6290
09/21/2023, 7:49 PMrahul1
09/21/2023, 7:53 PMmikee6290
09/21/2023, 7:57 PMrahul1
09/21/2023, 8:00 PMmikee6290
09/21/2023, 8:02 PMrahul1
09/21/2023, 8:10 PMnpm run dev -w packages/react, it will spin up a tool called storybook on localhost:6006 (our hosted version here (https://storybook.medplum.com/?path=/story/medplum-questionnaireform--ahchrsn-screening)rahul1
09/21/2023, 8:10 PMQuestionnaireForm component, you would be able to see a "HiloTest" examplemikee6290
09/21/2023, 8:10 PMrahul1
09/21/2023, 8:11 PMmikee6290
09/21/2023, 8:11 PMmikee6290
09/22/2023, 10:18 AMrahul1
09/22/2023, 8:13 PMrahul1
09/22/2023, 8:14 PMrahul1
09/22/2023, 8:14 PMmikee6290
09/22/2023, 8:15 PMrahul1
09/22/2023, 8:15 PMrahul1
09/22/2023, 8:15 PMrahul1
09/22/2023, 8:15 PMmikee6290
09/22/2023, 8:31 PMrahul1
09/22/2023, 8:46 PMrahul1
09/22/2023, 8:51 PMgit clone git@github.com:medplum/medplum.git medplum
2. git fetch origin
3. git checkout rahul-mikee-questionnaire-repro
4. npm ci
5. npm run build (this might take a few min)
6. npm run dev -w packages/react
7. Navigate to localhost:6006rahul1
09/22/2023, 8:52 PMrahul1
09/22/2023, 8:54 PMmikee6290
09/23/2023, 3:25 AMrahul1
09/23/2023, 5:07 AMrahul1
09/23/2023, 5:13 AMmikee6290
09/26/2023, 2:12 PMjamesin5053
09/26/2023, 5:46 PMmikee6290
09/26/2023, 5:48 PMmikee6290
09/26/2023, 5:53 PM{
resourceType: 'Questionnaire',
name: 'New User profile completion',
title: 'Patient Intake Form',
status: 'active',
subjectType: [ 'Patient' ],
date: '2023-04-20T14:49:00.000Z',
publisher: 'Eamon',
purpose:
'When a new patient resource is created, the only information we automatically collect from the register form is the user\'s name, and email. The purpose of this form is to gather basic information about the patient in order to complete their profile',
id: 'f8a05c5a-0076-41fc-a73e-4b0771aa14e0',
meta: {
versionId: '844f44dd-7527-4101-9f88-06190cccb306',
lastUpdated: '2023-05-07T21:10:07.190Z',
author: {
reference: 'Practitioner/d2ef90d9-ca42-4583-a0fb-b10fb9a3e978',
display: 'Team Hilo'
},
project: 'b0aa142c-85e2-4fb3-a62c-fe949a0b0573',
compartment: [ { reference: 'Project/b0aa142c-85e2-4fb3-a62c-fe949a0b0573' } ]
},
item: [
{
id: 'id-19',
linkId: 'g15',
type: 'group',
text: 'We Need some more info to complete your profile',
item: [
{
id: 'id-22',
linkId: 'q3',
type: 'choice',
text: 'Gender at birth',
answerOption: [
{ id: 'id-23', valueString: 'Male' },
{ id: 'id-24', valueString: 'Female' },
{ id: 'id-25', valueString: 'Other' }
]
},
{ id: 'id-26', linkId: 'q4', type: 'date', text: 'Birthdate' },
{
id: 'id-27',
linkId: 'q5',
type: 'attachment',
text: 'Profile Picture'
},
{ id: 'id-28', linkId: 'q6', type: 'reference', text: 'Address' }
]
}
]
}mikee6290
09/26/2023, 5:56 PMjamesin5053
09/26/2023, 6:30 PMmikee6290
09/27/2023, 12:14 PMmikee6290
09/27/2023, 1:36 PMmikee6290
09/27/2023, 2:30 PMmikee6290
09/27/2023, 2:31 PMmikee6290
10/05/2023, 5:08 PMrahul1
10/12/2023, 6:32 PMrahul1
10/12/2023, 6:32 PM