feat(MED-131): send fake test response for an order
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { format } from 'date-fns';
|
||||
import Isikukood from 'isikukood';
|
||||
import Isikukood, { Gender } from 'isikukood';
|
||||
import { Tables } from '@/packages/supabase/src/database.types';
|
||||
import { DATE_FORMAT, DATE_TIME_FORMAT } from '@/lib/constants';
|
||||
|
||||
@@ -9,26 +9,27 @@ export const getPais = (
|
||||
sender: string,
|
||||
recipient: string,
|
||||
createdAt: Date,
|
||||
messageId: number,
|
||||
orderId: string,
|
||||
packageName = "OL",
|
||||
) => {
|
||||
if (isProd) {
|
||||
// return correct data
|
||||
}
|
||||
return `<Pais>
|
||||
<Pakett versioon="20">OL</Pakett>
|
||||
<Pakett versioon="20">${packageName}</Pakett>
|
||||
<Saatja>${sender}</Saatja>
|
||||
<Saaja>${recipient}</Saaja>
|
||||
<Aeg>${format(createdAt, DATE_TIME_FORMAT)}</Aeg>
|
||||
<SaadetisId>${messageId}</SaadetisId>
|
||||
<SaadetisId>${orderId}</SaadetisId>
|
||||
<Email>argo@medreport.ee</Email>
|
||||
</Pais>`;
|
||||
};
|
||||
|
||||
export const getClientInstitution = () => {
|
||||
export const getClientInstitution = ({ index }: { index?: number } = {}) => {
|
||||
if (isProd) {
|
||||
// return correct data
|
||||
}
|
||||
return `<Asutus tyyp="TELLIJA">
|
||||
return `<Asutus tyyp="TELLIJA" ${index ? ` jarjenumber="${index}"` : ''}>
|
||||
<AsutuseId>16381793</AsutuseId>
|
||||
<AsutuseNimi>MedReport OÜ</AsutuseNimi>
|
||||
<AsutuseKood>TSU</AsutuseKood>
|
||||
@@ -36,11 +37,11 @@ export const getClientInstitution = () => {
|
||||
</Asutus>`;
|
||||
};
|
||||
|
||||
export const getProviderInstitution = () => {
|
||||
export const getProviderInstitution = ({ index }: { index?: number } = {}) => {
|
||||
if (isProd) {
|
||||
// return correct data
|
||||
}
|
||||
return `<Asutus tyyp="TEOSTAJA">
|
||||
return `<Asutus tyyp="TEOSTAJA" ${index ? ` jarjenumber="${index}"` : ''}>
|
||||
<AsutuseId>11107913</AsutuseId>
|
||||
<AsutuseNimi>Synlab HTI Tallinn</AsutuseNimi>
|
||||
<AsutuseKood>SLA</AsutuseKood>
|
||||
@@ -68,7 +69,7 @@ export const getClientPerson = ({
|
||||
<PersonalKood>${idCode}</PersonalKood>
|
||||
<PersonalPerekonnaNimi>${lastName}</PersonalPerekonnaNimi>
|
||||
<PersonalEesNimi>${firstName}</PersonalEesNimi>
|
||||
<Telefon>${phone}</Telefon>
|
||||
${phone ? `<Telefon>${phone.startsWith('+372') ? phone : `+372${phone}`}</Telefon>` : ''}
|
||||
</Personal>`;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user