File tree Expand file tree Collapse file tree 2 files changed +18
-1
lines changed
packages/openchs-android/src/views Expand file tree Collapse file tree 2 files changed +18
-1
lines changed Original file line number Diff line number Diff line change 1- import { Text , TouchableOpacity , View } from "react-native" ;
1+ import { Text , TouchableOpacity , View , Image } from "react-native" ;
22import ListView from "deprecated-react-native-listview" ;
33import PropTypes from 'prop-types' ;
44import React , { Fragment } from "react" ;
@@ -22,6 +22,7 @@ import EncounterService from "../../service/EncounterService";
2222import CustomActivityIndicator from "../CustomActivityIndicator" ;
2323import PhoneCall from "../../model/PhoneCall" ;
2424import { TaskActionNames as Actions } from "../../action/task/TaskActions" ;
25+ import SignatureFormElement from "../form/formElement/SignatureFormElement" ;
2526
2627class Observations extends AbstractComponent {
2728 static propTypes = {
@@ -163,6 +164,13 @@ class Observations extends AbstractComponent {
163164 </ View >
164165 </ View >
165166 ) ;
167+ } else if ( renderType === Concept . dataType . Signature ) {
168+ return (
169+ < View style = { this . styles . observationColumn } >
170+ < Image width = { 100 } height = { 100 } source = { { uri : `file://${ SignatureFormElement . signatureFileDirectory } /${ observationModel . getValueWrapper ( ) . getValue ( ) } ` } } />
171+ < Text > </ Text >
172+ </ View >
173+ ) ;
166174 } else if ( Concept . dataType . Media . includes ( renderType ) ) {
167175 const allMediaURIs = _ . split ( displayable . displayValue , ',' ) ;
168176 return (
Original file line number Diff line number Diff line change @@ -43,6 +43,7 @@ import SingleSelectEncounterFormElement from "./formElement/SingleSelectEncounte
4343import MultiSelectEncounterFormElement from "./formElement/MultiSelectEncounterFormElement" ;
4444import MediaV2FormElement from "./formElement/MediaV2FormElement" ;
4545import Colors from "../primitives/Colors" ;
46+ import SignatureFormElement from "./formElement/SignatureFormElement" ;
4647
4748class FormElementGroup extends AbstractComponent {
4849 static propTypes = {
@@ -220,6 +221,14 @@ class FormElementGroup extends AbstractComponent {
220221 value = { this . getSelectedAnswer ( formElement . concept , new MultipleCodedValues ( ) ) }
221222 validationResult = { validationResult }
222223 /> , uniqueKey , formElement . uuid === erroredUUID ) ;
224+ } else if ( formElement . concept . datatype === Concept . dataType . Signature ) {
225+ return this . wrap ( < SignatureFormElement
226+ key = { uniqueKey }
227+ element = { formElement }
228+ actionName = { this . props . actions [ "TOGGLE_SINGLESELECT_ANSWER" ] }
229+ value = { this . getSelectedAnswer ( formElement . concept , new PrimitiveValue ( ) ) }
230+ validationResult = { validationResult }
231+ /> , uniqueKey , formElement . uuid === erroredUUID ) ;
223232 } else if ( [ Concept . dataType . ImageV2 ] . includes ( formElement . concept . datatype ) ) {
224233 return this . wrap ( < MediaV2FormElement
225234 key = { uniqueKey }
You can’t perform that action at this time.
0 commit comments