Skip to content

Commit

Permalink
Allow author to be Person
Browse files Browse the repository at this point in the history
  • Loading branch information
ir4y committed Feb 17, 2025
1 parent 3544973 commit 507c94c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/containers/PatientDetails/PatientDocument/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Organization, ParametersParameter, Patient, Practitioner, QuestionnaireResponse } from 'fhir/r4b';
import { Organization, ParametersParameter, Patient, Person, Practitioner, QuestionnaireResponse } from 'fhir/r4b';
import { useEffect, useState } from 'react';
import { useNavigate, useParams } from 'react-router-dom';

Expand All @@ -17,7 +17,7 @@ import { usePatientDocument } from './usePatientDocument';

export interface PatientDocumentProps {
patient: Patient;
author: WithId<Practitioner | Patient | Organization>;
author: WithId<Practitioner | Patient | Organization | Person>;
questionnaireResponse?: WithId<QuestionnaireResponse>;
launchContextParameters?: ParametersParameter[];
questionnaireId?: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import {
Organization,
ParametersParameter,
Patient,
Person,
Practitioner,
Provenance,
QuestionnaireResponse,
Expand Down Expand Up @@ -35,7 +36,7 @@ import { getProvenanceByEntity } from 'src/services/provenance';

export interface Props {
patient: Patient;
author: WithId<Practitioner | Patient | Organization>;
author: WithId<Practitioner | Patient | Organization|Person>;
questionnaireResponse?: WithId<QuestionnaireResponse>;
questionnaireId: string;
encounterId?: string;
Expand Down Expand Up @@ -74,7 +75,7 @@ async function onFormSubmit(
function prepareFormInitialParams(
props: Props & {
provenance?: WithId<Provenance>;
author?: WithId<Practitioner | Patient | Organization>;
author?: WithId<Practitioner | Patient | Organization | Person>;
provenanceBundle?: Bundle<WithId<Provenance>>;
},
): QuestionnaireResponseFormProps {
Expand Down

0 comments on commit 507c94c

Please sign in to comment.