update medipost order xml for live
This commit is contained in:
@@ -10,6 +10,7 @@ import {
|
||||
getClientInstitution,
|
||||
getClientPerson,
|
||||
getConfidentiality,
|
||||
getOrderEnteredPerson,
|
||||
getPais,
|
||||
getPatient,
|
||||
getProviderInstitution,
|
||||
@@ -558,9 +559,12 @@ export async function composeOrderXML({
|
||||
<!--<TeostajaAsutus>-->
|
||||
${getProviderInstitution()}
|
||||
<!--<TellijaIsik>-->
|
||||
${getClientPerson(person)}
|
||||
${getClientPerson()}
|
||||
<!--<SisestajaIsik>-->
|
||||
${getOrderEnteredPerson()}
|
||||
<TellijaMarkused>${comment ?? ''}</TellijaMarkused>
|
||||
${getPatient(person)}
|
||||
<!--<Patsient>-->
|
||||
${getPatient(person)}
|
||||
${getConfidentiality()}
|
||||
${specimenSection.join('')}
|
||||
${analysisSection?.join('')}
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
import {
|
||||
getClientInstitution,
|
||||
getClientPerson,
|
||||
getOrderEnteredPerson,
|
||||
getPais,
|
||||
getPatient,
|
||||
getProviderInstitution,
|
||||
@@ -104,7 +105,8 @@ export async function composeOrderTestResponseXML({
|
||||
<ValisTellimuseId>${orderId}</ValisTellimuseId>
|
||||
${getClientInstitution({ index: 1 })}
|
||||
${getProviderInstitution({ index: 1 })}
|
||||
${getClientPerson(person)}
|
||||
${getClientPerson()}
|
||||
${getOrderEnteredPerson()}
|
||||
<TellijaMarkused>Siia tuleb tellija poolne märkus</TellijaMarkused>
|
||||
|
||||
${getPatient(person)}
|
||||
|
||||
@@ -21,70 +21,48 @@ export const getPais = (
|
||||
<Saaja>${recipient}</Saaja>
|
||||
<Aeg>${format(createdAt, DATE_TIME_FORMAT)}</Aeg>
|
||||
<SaadetisId>${orderId}</SaadetisId>
|
||||
<Email>argo@medreport.ee</Email>
|
||||
<Email>info@medreport.ee</Email>
|
||||
</Pais>`;
|
||||
};
|
||||
|
||||
export const getClientInstitution = ({ index }: { index?: number } = {}) => {
|
||||
if (isProd) {
|
||||
// return correct data
|
||||
}
|
||||
return `<Asutus tyyp="TELLIJA" ${index ? ` jarjenumber="${index}"` : ''}>
|
||||
<AsutuseId>16381793</AsutuseId>
|
||||
<AsutuseNimi>MedReport OÜ</AsutuseNimi>
|
||||
<AsutuseKood>TSU</AsutuseKood>
|
||||
<AsutuseKood>MRP</AsutuseKood>
|
||||
<Telefon>+37258871517</Telefon>
|
||||
</Asutus>`;
|
||||
};
|
||||
|
||||
export const getProviderInstitution = ({ index }: { index?: number } = {}) => {
|
||||
if (isProd) {
|
||||
// return correct data
|
||||
}
|
||||
return `<Asutus tyyp="TEOSTAJA" ${index ? ` jarjenumber="${index}"` : ''}>
|
||||
<AsutuseId>11107913</AsutuseId>
|
||||
<AsutuseNimi>Synlab HTI Tallinn</AsutuseNimi>
|
||||
<AsutuseKood>SLA</AsutuseKood>
|
||||
<AsutuseNimi>Synlab Eesti OÜ</AsutuseNimi>
|
||||
<AsutuseKood>HTI</AsutuseKood>
|
||||
<AllyksuseNimi>Synlab HTI Tallinn</AllyksuseNimi>
|
||||
<Telefon>+3723417123</Telefon>
|
||||
<Telefon>+37217123</Telefon>
|
||||
</Asutus>`;
|
||||
};
|
||||
|
||||
export const getClientPerson = ({
|
||||
idCode,
|
||||
firstName,
|
||||
lastName,
|
||||
phone,
|
||||
}: {
|
||||
idCode: string,
|
||||
firstName: string,
|
||||
lastName: string,
|
||||
phone: string,
|
||||
}) => {
|
||||
if (isProd) {
|
||||
// return correct data
|
||||
}
|
||||
export const getClientPerson = () => {
|
||||
return `<Personal tyyp="TELLIJA" jarjenumber="1">
|
||||
<PersonalOID>1.3.6.1.4.1.28284.6.2.4.9</PersonalOID>
|
||||
<PersonalKood>${idCode}</PersonalKood>
|
||||
<PersonalPerekonnaNimi>${lastName}</PersonalPerekonnaNimi>
|
||||
<PersonalEesNimi>${firstName}</PersonalEesNimi>
|
||||
${phone ? `<Telefon>${phone.startsWith('+372') ? phone : `+372${phone}`}</Telefon>` : ''}
|
||||
<PersonalKood>D07907</PersonalKood>
|
||||
<PersonalPerekonnaNimi>Eduard</PersonalPerekonnaNimi>
|
||||
<PersonalEesNimi>Tsvetkov</PersonalEesNimi>
|
||||
<Telefon>+37258131202</Telefon>
|
||||
</Personal>`;
|
||||
};
|
||||
|
||||
// export const getOrderEnteredPerson = () => {
|
||||
// if (isProd) {
|
||||
// // return correct data
|
||||
// }
|
||||
// return `<Personal tyyp="SISESTAJA" jarjenumber="1">
|
||||
// <PersonalOID>1.3.6.1.4.1.28284.6.2.4.9</PersonalOID>
|
||||
// <PersonalKood>D07907</PersonalKood>
|
||||
// <PersonalPerekonnaNimi>Eduard</PersonalPerekonnaNimi>
|
||||
// <PersonalEesNimi>Tsvetkov</PersonalEesNimi>
|
||||
// <Telefon>+37258131202</Telefon>
|
||||
// </Personal>`;
|
||||
// };
|
||||
export const getOrderEnteredPerson = () => {
|
||||
return `<Personal tyyp="SISESTAJA" jarjenumber="2">
|
||||
<PersonalOID>1.3.6.1.4.1.28284.6.2.4.9</PersonalOID>
|
||||
<PersonalKood>D07907</PersonalKood>
|
||||
<PersonalPerekonnaNimi>Eduard</PersonalPerekonnaNimi>
|
||||
<PersonalEesNimi>Tsvetkov</PersonalEesNimi>
|
||||
<Telefon>+37258131202</Telefon>
|
||||
</Personal>`;
|
||||
};
|
||||
|
||||
export const getPatient = ({
|
||||
idCode,
|
||||
|
||||
Reference in New Issue
Block a user