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