<<script id="ecom-norma-referenced">
//TODO: repasar y quitar lo relacionado con selectores y precio.
/*TODO:
-Se llama a la [async function init()] dentro de aqui [ecomNormaReferencedScript]
desde fragment [dxp-ecom-portal/misc/fragments/Collection Tienda/ECOM-Global_functions/index.js] de la siguiente manera:
if (typeof window.ecomNormaReferencedScript?.init === "function") {
await window.ecomNormaReferencedScript.init();
}
*/
window.ecomNormaReferencedScript = (function ($) {
/* === CONFIG === */
let DEBUG = false;
let ROOT_SELECTOR = null;
function log(...args) {
if (DEBUG) console.log("[ecomNorma]", ...args);
}
/* === FUNCIONES PRIVADAS === */
function _euros(v) {
const n = Number(v) || 0;
return n.toLocaleString("es-ES", { minimumFractionDigits: 2, maximumFractionDigits: 2 }) + " €";
}
function _uniq(a) {
return Array.from(new Set(a));
}
function _fill($sel, values, textFn) {
const keep = $sel.val();
$sel.empty();
values.forEach(v => {
$sel.append($("option>", { value: v, text: textFn ? textFn(v) : v }));
});
if (keep && values.includes(keep)) $sel.val(keep);
else if (values.length) $sel.val(values[0]);
}
function _relabel($sel, textFn) {
$sel.find("option").each(function () {
const v = $(this).attr("value");
$(this).text(textFn ? textFn(v) : v);
});
}
/* === initCarousel — PÚBLICA === */
function initCarousel(force = false) {
const $owl = $(ROOT_SELECTOR + " .standards-container");
// no inicializar si no existe, está oculto o no tiene items
if (!$owl.length || !$owl.hasClass("owl-carousel") || !$owl.is(':visible') || $owl.children().length === 0) {
log("initCarousel abortado: no visible o sin items", $owl);
return;
}
if (force && $owl.hasClass("owl-loaded") && $owl.data("owl.carousel")) {
log("initCarousel Destruyendo Owl Carousel existent:", $owl);
$owl.trigger('destroy.owl.carousel');
// limpiar también owl-hidden para permitir reinicialización
$owl.removeClass('owl-loaded owl-hidden');
// limpiar markup de Owl
$owl.find('.owl-stage-outer').children().unwrap();
}
if ($owl.length && !$owl.hasClass("owl-loaded") && !$owl.data("owl.carousel")) {
$owl.owlCarousel({
nav: true,
navText: [
'<i class="fa-solid fa-chevron-left"></i>',
'<i class="fa-solid fa-chevron-right"><i class="fa-solid fa-chevron-left"></iion>", { value: v, text: textFn ? textFn(v) : v }));
});
if (keep && values.includes(keep)) $sel.val(keep);
else if (values.length) $sel.val(values[0]);
}
function _relabel($sel, textFn) {
$sel.find("option").each(function () {
const v = $(this).attr("value");
$(this).text(textFn ? textFn(v) : v);
});
}
/* === initCarousel — PÚBLICA === */
function initCarousel(force = false) {
const $owl = $(ROOT_SELECTOR + " .standards-container");
// no inicializar si no existe, está oculto o no tiene items
if (!$owl.length || !$owl.hasClass("owl-carousel") || !$owl.is(':visible') || $owl.children().length === 0) {
log("initCarousel abortado: no visible o sin items", $owl);
return;
}
if (force && $owl.hasClass("owl-loaded") && $owl.data("owl.carousel")) {
log("initCarousel Destruyendo Owl Carousel existent:", $owl);
$owl.trigger('destroy.owl.carousel');
// limpiar también owl-hidden para permitir reinicialización
$owl.removeClass('owl-loaded owl-hidden');
// limpiar markup de Owl
$owl.find('.owl-stage-outer').children().unwrap();
}
if ($owl.length && !$owl.hasClass("owl-loaded") && !$owl.data("owl.carousel")) {
$owl.owlCarousel({
nav: true,
navText: [
'>',
'<i class="fa-solid fa-chevron-right"></i</i
script id="ecom-norma-scripts">
window.ecomNormaScripts = window.ecomNormaScripts || (function () {
/* =====================================
PROPIEDADES PRIVADAS
===================================== */
const privateProps = window.ecomNormaScripts?.privateProps || {
//test1: {},
//test2: 0
};
/* =====================================
INICIALIZACIÓN DE PROPERTIES PRIVADAS
===================================== */
(function initPrivateProps() {
/* privateProps.test1 = {
test11: "",
test111: {
test1112: "00,00",
test1113: "€",
test1114: "00",
test1115: "000-00-000",
test1116: "0000",
test1117: "000"
},
test2: ""
};*/
})();
/* =====================================
PROPIEDADES PÚBLICAS
===================================== */
const publicProps = {
funcsEcomGlobalScripts: null,
propsEcomGlobalScripts: null,
isDebug: false
};
/* =====================================
INICIALIZACIÓN DE PROPERTIES PÚBLICAS
===================================== */
(function initPublicProps() {
//publicProps.TEST1 = "";
//publicProps.TEST2 = 0;
})();
/* =====================================
FUNCIONES PÚBLICAS
===================================== */
//En functions declaramos la functions publicas
const functions = {};
functions.init = async function () {
await _initPublicProps();
await _DOMContentLoaded();
};
/* =====================================
FUNCIONES PRIVADAS
===================================== */
const _initPublicProps = async function() {
// Obtener referencias de ecomGlobalScripts
publicProps.funcsEcomGlobalScripts = window.ecomGlobalScripts?.functions || {};
publicProps.propsEcomGlobalScripts = window.ecomGlobalScripts?.properties || {};
// Configurar debug
publicProps.isDebug = (false || publicProps.propsEcomGlobalScripts?.isDebug) ?? false;
// Asegurar que querySelectors existe (crearlo si no existe)
publicProps.propsEcomGlobalScripts.querySelectors ??= {};
// Agregar las propiedades querySelectors
publicProps.propsEcomGlobalScripts.querySelectors.rootSelector = "#ecom-norma-detail-normas-referenced .standards-section";
};
const _DOMContentLoaded = async function () {
//Se llama desde [dxp-ecom-portal/misc/adt/tienda/Detalle producto/ECOM-Global-Scripts.ftl] desde: document.addEventListener("DOMContentLoaded")
if (publicProps.isDebug) console.log("DOMContentLoaded ecom Norma scripts");
window.ecomGlobalScripts?.functions?.pushViewItemEvent?.({
name: "NF EN 54-7",
id: "FA039124",
category: "Normas AFNOR"
});
};
// ---- Execute Listener DOMContentLoaded ----
document.addEventListener("DOMContentLoaded", async function() {
//Se llama desde [dxp-ecom-portal/misc/adt/tienda/Detalle producto/ECOM-Global-Scripts.ftl] desde: document.addEventListener("DOMContentLoaded")
//await _DOMContentLoaded();
});
/* =====================================
API PÚBLICA
===================================== */
return {
properties: publicProps, // properties public
functions: functions // functions public
};
})();
UNE-EN ISO 13972:2022
Informática sanitaria. Modelos de información clínica. Características, estructuras y requisitos. (ISO 13972:2022).
| Edition date: |
2022-09-21
In Force
|
|---|---|
| Available languages: | English, Spanish |
| ICS: | 35.240.80-IT applications in health care technology |
| CTN: | CTN 139 - Tecnologías de la información y las comunicaciones para la salud |
|
International Equivalence |
Identic EN ISO 13972:2022 Identic ISO 13972:2022 |










