Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document Selector Fix #214

Merged
merged 31 commits into from
Nov 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
fd75bec
Add H2 tab
ebrockainq Oct 14, 2024
3bb0612
Refine sub-criteria
ebrockainq Oct 15, 2024
0ec59d0
Merge branch 'dev' into evan-dev-H2-tab
ebrockainq Oct 15, 2024
4c2315d
Resolve merge conflict
ebrockainq Oct 15, 2024
0b8a2c0
Fix manual validation on tests that did not require it
ebrockainq Oct 16, 2024
a935c33
Fix pending displayed when successful response already generated
ebrockainq Oct 16, 2024
1bc2efd
Merge branch 'dev' into evan-dev-H2-tab
ebrockainq Oct 16, 2024
3d932b2
Fix H2 subgroups
ebrockainq Oct 22, 2024
09b4832
Merge branch 'dev' into evan-dev-H2-tab
ebrockainq Oct 22, 2024
447cd88
Fix receive tab
ebrockainq Oct 22, 2024
fff243f
Merge branch 'evan-dev-H2-tab' of https://github.com/onc-healthit/sit…
ebrockainq Oct 22, 2024
2acada7
Merge branch 'dev' into evan-dev-H2-tab
ebrockainq Oct 22, 2024
c64f36d
Minor fixes to fixed endpoints and H2 subgroups
ebrockainq Oct 23, 2024
2206f9f
Merge branch 'dev' into evan-dev-H2-tab
ebrockainq Oct 23, 2024
fe761fd
Merge branch 'dev' into evan-dev-H2-tab
ebrockainq Oct 23, 2024
6fdada6
Fix incorrect endpoint display
ebrockainq Oct 24, 2024
433cf07
Fix sub-criteria selection and MT test accept/reject buttons
ebrockainq Oct 24, 2024
fe3c8b5
Add tests to sendEdgeTests
ebrockainq Oct 24, 2024
b8b7eec
Merge remote-tracking branch 'origin/dev' into evan-dev-H2-tab
akanuri9 Oct 29, 2024
64eb28a
Fix pending status after refresh
akanuri9 Oct 29, 2024
da9088b
Add criteriaMet type manual
akanuri9 Oct 31, 2024
7e0bc3e
Resolve merge conflicts with dev
akanuri9 Oct 31, 2024
684fcf8
Remove duplicate
akanuri9 Oct 31, 2024
d122665
Merge remote-tracking branch 'origin/dev' into evan-dev-H2-tab
akanuri9 Oct 31, 2024
80edb1d
Fix issues for HISP tabs
akanuri9 Oct 31, 2024
7de0b36
Fix XDR Test 16 and 17
akanuri9 Oct 31, 2024
caae60c
Merge remote-tracking branch 'origin/dev' into evan-dev-H2-tab
akanuri9 Oct 31, 2024
c682692
Merge remote-tracking branch 'origin/dev' into evan-dev-H2-tab
akanuri9 Nov 1, 2024
87bdd60
Fix XDR receiver test cases
akanuri9 Nov 4, 2024
f9f473e
Fix document selector to use right endpoint
akanuri9 Nov 5, 2024
1986b70
Merge remote-tracking branch 'origin/dev' into evan-dev-H2-tab
akanuri9 Nov 5, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions src/components/direct/hisp/DocumentSelector.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ interface DocumentSelectorProps {
onConfirm: (selectedData: { directory: string; fileName: string; fileLink: string }) => void
onClose: () => void
receive: boolean
protocol: string
}

export interface FileDetail {
Expand All @@ -37,7 +38,7 @@ export interface Directory {
files: FileDetail[]
}

const DocumentSelector = ({ onConfirm, onClose, receive: receive }: DocumentSelectorProps) => {
const DocumentSelector = ({ onConfirm, onClose, receive: receive, protocol }: DocumentSelectorProps) => {
const [open, setOpen] = useState(true)
const [documents, setDocuments] = useState<Documents>({})
const [selectedType, setSelectedType] = useState('cures')
Expand All @@ -46,9 +47,9 @@ const DocumentSelector = ({ onConfirm, onClose, receive: receive }: DocumentSele

useEffect(() => {
if (selectedType) {
fetchCCDADocuments(receive).then(setDocuments).catch(console.error)
fetchCCDADocuments(protocol).then(setDocuments).catch(console.error)
}
}, [selectedType, receive])
}, [selectedType, protocol])

interface FileDetail {
svap: boolean
Expand Down Expand Up @@ -105,7 +106,7 @@ const DocumentSelector = ({ onConfirm, onClose, receive: receive }: DocumentSele

const documentType = receive
? selectedType === 'cures'
? 'Receiver SUT Test Data'
? 'Cures Update Receiver SUT Test Data'
: 'Cures Update Svap Uscdiv3 Receiver SUT Test Data'
: selectedType === 'cures'
? 'Cures Update Sender SUT Test Data'
Expand Down
1 change: 1 addition & 0 deletions src/components/direct/hisp/TestCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -619,6 +619,7 @@ const TestCard = ({
onConfirm={handleDocumentConfirm}
onClose={handleDocumentSelectorClose}
receive={test.sutRole === 'receiver'}
protocol={test.protocol || ''}
/>
)}
{_.has(test, 'fields') &&
Expand Down
1 change: 1 addition & 0 deletions src/components/direct/hisp/XDRTestCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -847,6 +847,7 @@ const TestCard = ({ test }: TestCardProps) => {
onConfirm={handleDocumentConfirm}
onClose={handleDocumentSelectorClose}
receive={test.sutRole === 'receiver'}
protocol={test.name?.includes('XDR') ? 'xdr' : ''}
/>
)}

Expand Down
10 changes: 6 additions & 4 deletions src/components/direct/test-by-criteria/ServerActions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -375,10 +375,12 @@ export async function GetStatus(testCaseId: string): Promise<StatusResponse> {
}
}

export async function fetchCCDADocuments(receive: boolean): Promise<Documents> {
const baseUrl = receive
? process.env.CCDA_DOCUMENTS_XDR || 'https://ett.healthit.gov/ett/api/ccdadocuments?testCaseType=xdr'
: process.env.CCDA_DOCUMENTS || 'https://ett.healthit.gov/ett/api/ccdadocuments?testCaseType'
export async function fetchCCDADocuments(protocol: string): Promise<Documents> {
console.log(protocol)
const baseUrl =
protocol === 'xdr'
? process.env.CCDA_DOCUMENTS_XDR || 'https://ett.healthit.gov/ett/api/ccdadocuments?testCaseType=xdr'
: process.env.CCDA_DOCUMENTS || 'https://ett.healthit.gov/ett/api/ccdadocuments?testCaseType'

const config = {
method: 'get',
Expand Down