Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 3 additions & 1 deletion .github/workflows/ci-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ jobs:
name: Check tsc, lint, and prettier on front end
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v4
with:
clean: true
- uses: actions/setup-node@v1
with:
node-version: "21.x"
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/docker-cd-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ jobs:
uses: actions/checkout@v3
with:
submodules: true
clean: true

- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v2
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/docker-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ jobs:
uses: actions/checkout@v3
with:
submodules: true
clean: true

- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v2
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/docker-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ jobs:
uses: actions/checkout@v3
with:
submodules: true
clean: true

- name: Test Server Docker image Builds
run: docker build .
1 change: 1 addition & 0 deletions .github/workflows/docker-tag-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ jobs:
uses: actions/checkout@v3
with:
submodules: true
clean: true

- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v2
Expand Down
2 changes: 1 addition & 1 deletion backend/src/database/schemas/doctorOrderSchemas.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import mongoose from 'mongoose';
export const orderSchema = new mongoose.Schema({
orderId: String,
caseNumber: String,
authNumber: String,
prescriberOrderNumber: String,
patientName: String,
patientFirstName: String,
Expand Down
14 changes: 7 additions & 7 deletions backend/src/routes/doctorOrders.js
Original file line number Diff line number Diff line change
Expand Up @@ -278,15 +278,15 @@ const getGuidanceResponse = async order => {
return null;
}

// Make the etasu call with the auth number if it exists, if not call with patient and medication
// Make the etasu call with the case number if it exists, if not call with patient and medication
let body = {};
if (order.authNumber !== '' && !env.USE_INTERMEDIARY) {
if (order.caseNumber && !env.USE_INTERMEDIARY) {
body = {
resourceType: 'Parameters',
parameter: [
{
name: 'authNumber',
valueString: order.authNumber
name: 'caseNumber',
valueString: order.caseNumber
}
]
};
Expand Down Expand Up @@ -334,7 +334,7 @@ const getGuidanceResponse = async order => {
'content-type': 'application/json'
}
});
console.log('Retrieved order', response);
console.log('Retrieved order', JSON.stringify(response.data, null, 4));
console.log('URL', etasuUrl);
const responseResource = response.data.parameter?.[0]?.resource;
return responseResource;
Expand All @@ -358,8 +358,8 @@ const getDispenseStatus = (order, guidanceResponse) => {
async function parseNCPDPScript(newRx) {
// Parsing XML NCPDP SCRIPT from EHR
const incompleteOrder = {
caseNumber: newRx.Message.Header.MessageID.toString(), // Will need to return to this and use actual pt identifier or uuid
authNumber: newRx.Message.Header.AuthorizationNumber,
orderId: newRx.Message.Header.MessageID.toString(), // Will need to return to this and use actual pt identifier or uuid
caseNumber: newRx.Message.Header.AuthorizationNumber,
prescriberOrderNumber: newRx.Message.Header.PrescriberOrderNumber,
patientName:
newRx.Message.Body.NewRx.Patient.HumanPatient.Name.FirstName +
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,15 @@ type Requirement = {
};
};

type AuthNumber = {
name: 'auth_number';
type CaseNumber = {
name: 'case_number';
valueString: string;
};

type MetRequirements = Requirement | AuthNumber;
type MetRequirements = Requirement | CaseNumber;

export type DoctorOrder = {
caseNumber?: string;
authNumber?: string;
patientName?: string;
patientDOB?: string;
doctorName?: string;
Expand Down Expand Up @@ -69,7 +68,7 @@ const EtasuPopUp = (props: any) => {
const [doctorOrder, setDoctorOrder] = useState<DoctorOrder>();

const etasuElements = (
(doctorOrder?.metRequirements || []).filter(m => m.name !== 'auth_number') as Requirement[]
(doctorOrder?.metRequirements || []).filter(m => m.name !== 'case_number') as Requirement[]
).sort((first: Requirement, second: Requirement) => {
// Keep the other forms unsorted.
if (second.name.includes('Patient Status Update')) {
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/views/DoctorOrders/OrderCard/OrderCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ import PickedUpButton from './PickedUpButton';
import VerifyButton from './VerifyButton';

export type DoctorOrder = {
orderId?: string;
caseNumber?: string;
authNumber?: string;
patientName?: string;
patientDOB?: string;
doctorName?: string;
Expand Down Expand Up @@ -111,7 +111,7 @@ const OrderCard = (props: { tabStatus: TabStatus }) => {
return (
<Card sx={{ bgcolor: '#F5F5F7' }}>
{doctorOrders.map(row => (
<Card key={row.caseNumber} sx={{ minWidth: 275, margin: 2, boxShadow: '10px' }}>
<Card key={row.orderId} sx={{ minWidth: 275, margin: 2, boxShadow: '10px' }}>
<Card>
<CardContent>
<Box>
Expand Down
Loading