Skip to content

Commit

Permalink
tweak the url rep
Browse files Browse the repository at this point in the history
  • Loading branch information
hadijahkyampeire committed May 21, 2024
1 parent fce74f7 commit 94b240f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/components/encounter/encounter-form.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ const EncounterForm: React.FC<EncounterFormProps> = ({
sessionMode: sessionMode || (form?.encounter ? 'edit' : 'enter'),
encounterDate: formSessionDate,
encounterProvider: provider,
encounterRole: role,
encounterRole,
form: form,
visit: visit,
setEncounterDate,
Expand Down Expand Up @@ -728,7 +728,7 @@ const EncounterForm: React.FC<EncounterFormProps> = ({
patient={patient}
formSessionDate={encounterDate}
provider={provider}
role={role}
role={encounterRole}
location={location}
visit={visit}
values={values}
Expand Down
2 changes: 1 addition & 1 deletion src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ export const ConceptFalse = '488b58ff-64f5-4f8a-8979-fa79940b1594';
export const UnspecifiedValue = 'VALUE_UNSPECIFIED';
export const encounterRepresentation =
'custom:(uuid,encounterDatetime,encounterType,location:(uuid,name),' +
'patient:(uuid,display),encounterProviders:(uuid,provider:(uuid,name)),' +
'patient:(uuid,display),encounterProviders:(uuid,provider:(uuid,name),encounterRole:(uuid,name)),' +
'orders:(uuid,display,concept:(uuid,display),voided),' +
'obs:(uuid,obsDatetime,voided,groupMembers,formFieldNamespace,formFieldPath,concept:(uuid,name:(uuid,name)),value:(uuid,name:(uuid,name),' +
'names:(uuid,conceptNameType,name))))';
Expand Down
4 changes: 2 additions & 2 deletions src/submission-handlers/encounterRoleHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export const EncounterRoleHandler: SubmissionHandler = {
context: EncounterContext,
) => {
if (encounter) {
return encounter.encounterProviders[0]?.encounterRole;
return encounter.encounterProviders[0]?.encounterRole?.uuid;
} else {
return context.encounterRole;
}
Expand All @@ -22,7 +22,7 @@ export const EncounterRoleHandler: SubmissionHandler = {
return value;
},
getPreviousValue: (field: FormField, encounter: OpenmrsEncounter, allFormFields: Array<FormField>) => {
const encounterRole = encounter.encounterProviders[0]?.encounterRole;
const encounterRole = encounter.encounterProviders[0]?.encounterRole?.uuid;
return encounterRole || null;
},
};

0 comments on commit 94b240f

Please sign in to comment.