Skip to content

Commit

Permalink
run prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
plarocque4 committed Feb 23, 2024
1 parent 45a5a6f commit 018d098
Showing 1 changed file with 32 additions and 23 deletions.
55 changes: 32 additions & 23 deletions src/views/Patient/MedReqDropDown/cdsHooksCards/cdsHooksCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,12 @@ import axios from 'axios';
import Client from 'fhirclient/lib/Client';
import { FhirResource, Task } from 'fhir/r4';

Check warning on line 6 in src/views/Patient/MedReqDropDown/cdsHooksCards/cdsHooksCard.tsx

View workflow job for this annotation

GitHub Actions / Check tsc, lint, and prettier

'FhirResource' is defined but never used

Check warning on line 6 in src/views/Patient/MedReqDropDown/cdsHooksCards/cdsHooksCard.tsx

View workflow job for this annotation

GitHub Actions / Check tsc, lint, and prettier

'Task' is defined but never used

Check warning on line 6 in src/views/Patient/MedReqDropDown/cdsHooksCards/cdsHooksCard.tsx

View workflow job for this annotation

GitHub Actions / Check tsc, lint, and prettier

'FhirResource' is defined but never used

Check warning on line 6 in src/views/Patient/MedReqDropDown/cdsHooksCards/cdsHooksCard.tsx

View workflow job for this annotation

GitHub Actions / Check tsc, lint, and prettier

'Task' is defined but never used

import { Card as HooksCard, Link, Suggestion, Action } from '../../../../cds-hooks/resources/HookTypes';
import {
Card as HooksCard,
Link,
Suggestion,
Action
} from '../../../../cds-hooks/resources/HookTypes';
import { SmartApp } from '../../../Questionnaire/SmartApp';
import { AppContext, getAppContext } from '../../../Questionnaire/questionnaireUtil';
import PictureAsPdfIcon from '@mui/icons-material/PictureAsPdf';
Expand Down Expand Up @@ -119,31 +124,35 @@ const CdsHooksCard = (props: CdsHooksCardProps) => {
uri = action.resource.resourceType;
console.log('completing suggested action CREATE: ' + uri);

props.client.request({
url: action.resource.resourceType,
method: 'POST',
headers: {
'content-type': 'application/json'
},
body: JSON.stringify(action.resource)
}).then(result => {
console.log('suggested action CREATE result:');
console.log(result);
});
props.client
.request({
url: action.resource.resourceType,
method: 'POST',
headers: {
'content-type': 'application/json'
},
body: JSON.stringify(action.resource)
})
.then(result => {
console.log('suggested action CREATE result:');
console.log(result);
});
} else if (action.type.toUpperCase() === 'UPDATE') {
uri = action.resource.resourceType + '/' + action.resource.id;
console.log('completing suggested action UPDATE: ' + uri);
props.client.request({
url: action.resource.resourceType + '/' + action.resource.id,
method: 'PUT',
headers: {
'content-type': 'application/json'
},
body: JSON.stringify(action.resource)
}).then(result => {
console.log('suggested action UPDATE result:');
console.log(result);
});
props.client
.request({
url: action.resource.resourceType + '/' + action.resource.id,
method: 'PUT',
headers: {
'content-type': 'application/json'
},
body: JSON.stringify(action.resource)
})
.then(result => {
console.log('suggested action UPDATE result:');
console.log(result);
});
} else {
console.log('WARNING: unknown action: ' + action.type);
}
Expand Down

0 comments on commit 018d098

Please sign in to comment.